mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-25 03:59:06 +00:00
29cca2e48b
* Move flake8 configuration out of root directory * Move PHPStan configuration out of root directory
24 lines
543 B
Bash
Executable File
24 lines
543 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
cd "${SCRIPT_DIR}"
|
|
|
|
source "set_vars.inc.sh"
|
|
|
|
# Run commands from the project root directory.
|
|
pushd ..
|
|
|
|
set -x
|
|
|
|
if [[ $(echo "${CI_PHP_VERSION} >= 7.4" | bc -l) -eq 1 ]]; then
|
|
vendor/bin/phpstan analyse --ansi --configuration="tests/phpstan.neon" .
|
|
if [[ "${?}" -ne 0 ]]; then
|
|
echo "Error: phpstan static analysis check failed"
|
|
errors+=("phpstan static analysis check failed")
|
|
fi
|
|
else
|
|
echo "Skipped running phpstan check"
|
|
fi
|
|
|
|
popd
|