From 0d7882f9ec367550ebb8216769893de768a3c731 Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen.haas@lakedrops.com>
Date: Thu, 9 Nov 2023 10:26:17 +0100
Subject: [PATCH] Fix PHPStan test script

---
 ahoy.test.yml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/ahoy.test.yml b/ahoy.test.yml
index 9df65d5..e3d2619 100644
--- a/ahoy.test.yml
+++ b/ahoy.test.yml
@@ -49,7 +49,12 @@ commands:
     cmd: ahoy d4d exec vendor/bin/phpunit --configuration /var/www/html/tests/phpunit.xml.dist --list-groups "$@"
     usage: List available test groups of PHP unit tests
   phpstan:
-    cmd: ahoy d4d exec vendor/bin/phpstan analyze --configuration=/var/www/html/tests/phpstan.neon "$@"
+    cmd: |
+      module=$1
+      shift
+      config=/var/www/html/vendor/lakedrops/drupal-development-environment/defaults/phpstan.neon
+      if [[ -f /var/www/html/$module/phpstan.neon ]]; then config=/var/www/html/$module/phpstan.neon; fi
+      ahoy d4d exec vendor/bin/phpstan analyze --configuration=$config $module $@
     usage: PHPStan tests
   phpstanmodule:
     cmd: |
-- 
GitLab