gnu-social/docker/tooling/phpstan.sh

17 lines
408 B
Bash
Raw Normal View History

#!/usr/bin/env sh
cd /var/www/social || exit 1
ARGS=$(echo "$*" | sed 's#\(/[^/]\+\)*/phpstan\.neon#phpstan.neon#') # Remove absolute path to config file
rm -rf /var/www/social/var/cache/*
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
rm -rf /var/www/social/var/cache/*