Build/Hooks/tests.sh

20 lines
472 B
Bash

#!/bin/bash
isPhanTestSuccessfull() {
php -d memory_limit=4G ${rootpath}/vendor/bin/phan -k ${rootpath}/Build/Config/phan.php -f "$1"
if [ $? -ne 0 ]; then
return 0;
fi
return 1;
}
isPhpStanTestSuccessfull() {
php -d memory_limit=4G ${rootpath}/vendor/bin/phpstan analyse --autoload-file=${rootpath}/phpOMS/Autoloader.php -l 7 -c ${rootpath}/Build/Config/phpstan.neon "$1"
if [ $? -ne 0 ]; then
return 0;
fi
return 1;
}