language: php

php:
  - '7.2'
  - '7.3'
  - '7.4'

before_script:
  - composer self-update
  - composer install --no-interaction --ignore-platform-reqs

cache:
  directories:
    - $HOME/.composer/cache/files

script:
  - vendor/bin/php-cs-fixer fix --dry-run --diff
  - vendor/bin/phpstan analyse -l 4 src
  - phpunit --configuration phpunit.xml.dist
