name: Code style

on:
  pull_request: null
  push:
    branches:
      - master

jobs:
  code_analysis:
    strategy:
      fail-fast: false
      matrix:
        actions:
          -
            name: "Code style"
            run: vendor/bin/php-cs-fixer fix -v --diff --dry-run
        php-versions: ['7.4']

    name: ${{ matrix.actions.name }}
    runs-on: ubuntu-latest

    steps:
      -   uses: actions/checkout@v2

      # see https://github.com/shivammathur/setup-php
      -   uses: shivammathur/setup-php@v2
          with:
            php-version: ${{ matrix.php-versions }}
            coverage: none

      # composer install cache - https://github.com/ramsey/composer-install
      -   uses: "ramsey/composer-install@v1"

      -   run: ${{ matrix.actions.run }}

Add code style check to CI
Add code style check to CI
