name: Code style

on:
    pull_request:
    push:
        branches: [ master ]

jobs:
    php-cs-fixer:
        name: PHP-CodeSniffer
        runs-on: ubuntu-latest
        steps:
            - name: Checkout
              uses: actions/checkout@v2

            - name: Setup PHP
              uses: shivammathur/setup-php@v2

            - name: Install dependencies
              run: composer install

            - name: Run script
              run: ./vendor/bin/phpcs src --standard=psr12 -sp
