diff --git a/static_tests.sh b/static_tests.sh index 182b422..a8ace00 100755 --- a/static_tests.sh +++ b/static_tests.sh @@ -1,6 +1,11 @@ #!/bin/bash if [ ! -x vendor/bin/phpstan ]; then - composer require --dev phpstan/phpstan + if which composer >/dev/null 2>&1; then + echo "Running Composer to install phpstan." + composer require --dev phpstan/phpstan + else + echo "Please install php composer!" + fi fi -./vendor/bin/phpstan analyse +./vendor/bin/phpstan analyse \ No newline at end of file