#!/usr/bin/env bash

set -e

echo Running Security Checker ...
curl -sS https://get.symfony.com/cli/installer | bash
~/.symfony/bin/symfony security:check

echo Running CS Fixer ...
curl -L https://cs.symfony.com/download/php-cs-fixer-v2.phar -o php-cs-fixer
chmod +x php-cs-fixer
./php-cs-fixer fix

echo Running PHPUnit ...
curl -L https://phar.phpunit.de/phpunit-6.5.phar -o phpunit
chmod +x phpunit
./phpunit -c .

echo Running PHPStan ...
curl -L https://github.com/phpstan/phpstan/releases/download/0.11.5/phpstan.phar -o phpstan
chmod +x phpstan
./phpstan analyse src
