name: PHP-CS-Fixer

on: [ pull_request, push ]

jobs:
  lint:
    name: PHP-CS-Fixer

    runs-on: ubuntu-latest

    steps:
      - name: Checkout the code
        uses: actions/checkout@v4

      - name: Ignore comments in switch
        run: php tests/remove-comments-in-switch.php

      - name: Check for code style violation with PHP-CS-Fixer
        uses: docker://oskarstark/php-cs-fixer-ga
        with:
          args: --diff --dry-run
