name: PHP Code Style

on: [push]

jobs:
    phpcs:
        name: PHP CodeSniffer
        runs-on: ubuntu-latest
        steps:
            - uses: actions/checkout@v1

            - name: Setup PHP
              uses: shivammathur/setup-php@7b8bf7af6a42e028cbcccf623bb8499b4d6edf02
              with:
                  php-version: '7.4'
                  coverage: none

            - name: Download PHPCS
              run: wget https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar

            - name: run PHP codesniffer
              run: php phpcs.phar -v --standard=_test/phpcs.xml
