From d6bf410add3b4009221edeb8fb7ea5024b117079 Mon Sep 17 00:00:00 2001 From: Vincent <13386908+vinnyNC@users.noreply.github.com> Date: Tue, 30 Sep 2025 21:54:55 -0400 Subject: [PATCH] Refactor PHPStan setup in Makefile: streamline configuration and remove redundant checks --- Makefile | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index a5b86ff..7246f95 100644 --- a/Makefile +++ b/Makefile @@ -86,6 +86,8 @@ test-watch: make test-unit; \ done +# PFStan configuration + # Code quality lint: @echo "Running PHPStan static analysis..." @@ -93,26 +95,23 @@ lint: phpstan-setup: @echo "Setting up PHPStan configuration..." - @if [ ! -f phpstan.neon ]; then \ - cat > phpstan.neon << EOF + cat > phpstan.neon << EOF parameters: - level: 8 - paths: - - models - - controllers - - services - - utils - - includes - excludes_analyse: - - vendor/ - - tests/ - - assets/ - - static/ - - migrations/ - ignoreErrors: - - '#Function config not found#' # For Config::get calls -EOF - fi + level: 8 + paths: + - models + - controllers + - services + - utils + - includes + excludes_analyse: + - vendor/ + - tests/ + - assets/ + - static/ + - migrations/ + ignoreErrors: + - '#Function config not found#' # For Config::get calls check: test lint @@ -136,7 +135,7 @@ clean: rm -rf tests/results/ rm -rf logs/ rm -f phpunit.xml.bak - find . -name "*.log" -not -name ".git*" -delete + find . -name "*.log" -not -name ".git*" -deleteW find . -name "*~" -delete find . -name "*.tmp" -delete