2021-09-09 00:40:34 +01:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
|
|
|
cd /var/www/social || exit 1
|
|
|
|
|
2021-10-21 15:11:00 +01:00
|
|
|
|
|
|
|
ARGS=$(echo "$*" | sed 's#\(/[^/]\+\)*/phpstan\.neon#phpstan.neon#') # Remove absolute path to config file
|
|
|
|
|
2021-09-13 13:52:44 +01:00
|
|
|
rm -rf /var/www/social/var/cache/*
|
2021-10-21 15:11:00 +01:00
|
|
|
|
|
|
|
if [ "$#" -eq 0 ]; then
|
|
|
|
PHPSTAN_BOOT_KERNEL=1 vendor/bin/phpstan --ansi --no-interaction --memory-limit=2G analyse
|
|
|
|
else
|
|
|
|
PHPSTAN_BOOT_KERNEL=1 vendor/bin/phpstan $ARGS
|
|
|
|
fi
|
|
|
|
|
2021-09-13 13:52:44 +01:00
|
|
|
rm -rf /var/www/social/var/cache/*
|