clear

echo -e "$(tput setaf 0)$(tput setab 2)Started autotest$(tput sgr 0)\n"

vendor/bin/phpcs index.php --standard='ruleset.xml' --colors
echo -e "$(tput setaf 0)$(tput setab 2)Finished PHP_CodeSniffer for custom files$(tput sgr 0)"

vendor/bin/phpcs src --standard='ruleset.xml' --colors
echo -e "$(tput setaf 0)$(tput setab 2)Finished PHP_CodeSniffer for src folder$(tput sgr 0)"

vendor/bin/phpcs tests --standard='ruleset.xml' --colors
echo -e "$(tput setaf 0)$(tput setab 2)Finished PHP_CodeSniffer for tests folder$(tput sgr 0)"

vendor/bin/phpstan analyse src --level max
echo -e "$(tput setaf 0)$(tput setab 2)Finished PHPStan for src folder$(tput sgr 0)\n"

vendor/bin/phpunit
echo -e "$(tput setaf 0)$(tput setab 2)Finished PHPUnit for test folder$(tput sgr 0)\n"

echo -e "$(tput setaf 0)$(tput setab 2)Finished autotest$(tput sgr 0)"