mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-21 21:00:50 +00:00
34 lines
766 B
Bash
Executable File
34 lines
766 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 true; then
|
|
|
|
phpstan_args=(--ansi --configuration="tests/phpstan.neon")
|
|
|
|
# Increase memory limit on local development.
|
|
if [[ "${CI}" != "true" ]]; then
|
|
phpstan_args+=(--memory-limit=256M)
|
|
fi
|
|
|
|
vendor/bin/phpstan --version
|
|
vendor/bin/phpstan analyse "${phpstan_args[@]}" .
|
|
if [[ "${?}" -ne 0 ]]; then
|
|
echo "❌ Error: phpstan static analysis check failed"
|
|
errors+=("phpstan static analysis check failed")
|
|
fi
|
|
else
|
|
echo "⚠️ Skipped running phpstan check"
|
|
warnings+=("Skipped running phpstan check")
|
|
fi
|
|
|
|
popd
|