From 9b9a4ad23e3a54853cc9b365246e6c8cb8de0a95 Mon Sep 17 00:00:00 2001
From: Bart Jaskulski <bjaskulski@protonmail.com>
Date: Tue, 14 Jan 2025 13:37:35 +0100
Subject: [PATCH] refactor: remove hardcoded phpstan level, let project control

Signed-off-by: Bart Jaskulski <bjaskulski@protonmail.com>
---
 includes/tests/static-analysis.yml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/includes/tests/static-analysis.yml b/includes/tests/static-analysis.yml
index 4e11213..0d74ee4 100644
--- a/includes/tests/static-analysis.yml
+++ b/includes/tests/static-analysis.yml
@@ -9,12 +9,12 @@ phpstan:
   script:
     - |
       if [ -f "vendor/bin/phpstan" ]; then
-        vendor/bin/phpstan analyse --level 5 --error-format=gitlab --memory-limit=2G > phpstan-codequality.json || true
-        vendor/bin/phpstan analyse --level 5 --error-format=junit --memory-limit=2G > phpstan-junit.xml
+        vendor/bin/phpstan analyse --error-format=gitlab --memory-limit=2G > phpstan-codequality.json || true
+        vendor/bin/phpstan analyse --error-format=junit --memory-limit=2G > phpstan-junit.xml
       elif [ -f "vendor/wpdesk/wp-wpdesk-composer/director/vendor/bin/phpstan" ]; then
         # PHPStan installed by director
-        vendor/wpdesk/wp-wpdesk-composer/director/vendor/bin/phpstan analyse --level 5 --error-format=gitlab --memory-limit=2G > phpstan-codequality.json || true
-        vendor/wpdesk/wp-wpdesk-composer/director/vendor/bin/phpstan analyse --level 5 --error-format=junit --memory-limit=2G > phpstan-junit.xml
+        vendor/wpdesk/wp-wpdesk-composer/director/vendor/bin/phpstan analyse --error-format=gitlab --memory-limit=2G > phpstan-codequality.json || true
+        vendor/wpdesk/wp-wpdesk-composer/director/vendor/bin/phpstan analyse --error-format=junit --memory-limit=2G > phpstan-junit.xml
       else
         echo "PHPStan not found! Install it with 'composer require --dev wpdesk/phpstan-rules'."
         exit 125
-- 
GitLab