name: "coding style"

on: ["pull_request", "push"]

jobs:
  unit-tests:
    name: "coding style"

    runs-on: "ubuntu-latest"

    steps:
      - name: "checkout"
        uses: "actions/checkout@v2"

      - name: "installing PHP"
        uses: "shivammathur/setup-php@v2"
        with:
          php-version: "8.0"

      - name: "installing php-cs-fixer"
        run: "wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v3.0.0/php-cs-fixer.phar"

      - name: "running php-cs-fixer"
        run: "php php-cs-fixer.phar fix --dry-run --diff --no-ansi"
