2021-09-09 08:40:34 +09:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
|
|
|
cd /var/www/social || exit 1
|
|
|
|
|
2021-10-21 23:11:00 +09:00
|
|
|
ARGS=$(echo "$*" | sed 's#\(/[^/]\+\)*/phpstan\.neon#phpstan.neon#') # Remove absolute path to config file
|
|
|
|
|
2021-09-13 21:52:44 +09:00
|
|
|
rm -rf /var/www/social/var/cache/*
|
2021-10-21 23:11:00 +09: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 21:52:44 +09:00
|
|
|
rm -rf /var/www/social/var/cache/*
|