name: code-style

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

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

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: '8.0'

      - uses: ramsey/composer-install@v1
        with:
          dependency-versions: 'highest'

      - name: Static Code Analysis
        run: composer lint
