phpstan.sh 407 B

12345678910111213141516
  1. #!/usr/bin/env sh
  2. cd /var/www/social || exit 1
  3. ARGS=$(echo "$*" | sed 's#\(/[^/]\+\)*/phpstan\.neon#phpstan.neon#') # Remove absolute path to config file
  4. rm -rf /var/www/social/var/cache/*
  5. if [ "$#" -eq 0 ]; then
  6. PHPSTAN_BOOT_KERNEL=1 vendor/bin/phpstan --ansi --no-interaction --memory-limit=2G analyse
  7. else
  8. PHPSTAN_BOOT_KERNEL=1 vendor/bin/phpstan $ARGS
  9. fi
  10. rm -rf /var/www/social/var/cache/*