From a1bd8e566f2b7cea4a14a811a62edd9454b37e4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=AFeul=20Rouquette?= <maieul@maieul.net> Date: Fri, 15 Sep 2023 21:48:00 +0200 Subject: [PATCH] chore: PHPstan niveau 1 + maj baseline (constantes non trouvables) + inclure le baseline dans la config --- phpstan-baseline.neon | 85 +++++++++++++++++++++++++++++++++++++++++++ phpstan.neon.dist | 6 +-- 2 files changed, 88 insertions(+), 3 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 1bc14753..339172d0 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -130,6 +130,11 @@ parameters: count: 1 path: action/exporter_formulaire.php + - + message: "#^Constant _DIR_CACHE not found\\.$#" + count: 1 + path: action/formidable_recuperer_export.php + - message: "#^Function _L not found\\.$#" count: 1 @@ -165,6 +170,11 @@ parameters: count: 1 path: action/formidable_recuperer_export.php + - + message: "#^Constant _LOG_DEBUG not found\\.$#" + count: 1 + path: action/formidable_recuperer_fichier.php + - message: "#^Function _T not found\\.$#" count: 1 @@ -210,6 +220,11 @@ parameters: count: 1 path: action/formidable_recuperer_fichier.php + - + message: "#^Constant _LOG_DEBUG not found\\.$#" + count: 2 + path: action/formidable_recuperer_fichier_par_email.php + - message: "#^Function _T not found\\.$#" count: 2 @@ -330,6 +345,11 @@ parameters: count: 1 path: afficher_diff/formulaire_traitements.php + - + message: "#^Constant _TRAITEMENT_RACCOURCIS not found\\.$#" + count: 1 + path: base/formidable_tables.php + - message: "#^Function include_spip not found\\.$#" count: 1 @@ -540,6 +560,16 @@ parameters: count: 1 path: filtre/tenter_unserialize.php + - + message: "#^Constant _LOG_INFO_IMPORTANTE not found\\.$#" + count: 1 + path: formidable_administrations.php + + - + message: "#^Constant _TIME_OUT not found\\.$#" + count: 4 + path: formidable_administrations.php + - message: "#^Function charger_fonction not found\\.$#" count: 1 @@ -1205,6 +1235,11 @@ parameters: count: 1 path: formulaires/exporter_formulaire_analyse.php + - + message: "#^Constant _DIR_CACHE not found\\.$#" + count: 1 + path: formulaires/exporter_formulaire_reponses.php + - message: "#^Function _T not found\\.$#" count: 7 @@ -1305,6 +1340,16 @@ parameters: count: 2 path: formulaires/exporter_formulaire_reponses.php + - + message: "#^Constant _LOG_INFO not found\\.$#" + count: 2 + path: formulaires/formidable.php + + - + message: "#^Constant _LOG_INFO_IMPORTANTE not found\\.$#" + count: 1 + path: formulaires/formidable.php + - message: "#^Function _T not found\\.$#" count: 5 @@ -1690,6 +1735,26 @@ parameters: count: 1 path: inc/formidable.php + - + message: "#^Constant _DIR_ETC not found\\.$#" + count: 1 + path: inc/formidable_fichiers.php + + - + message: "#^Constant _LOG_CRITIQUE not found\\.$#" + count: 2 + path: inc/formidable_fichiers.php + + - + message: "#^Constant _LOG_DEBUG not found\\.$#" + count: 2 + path: inc/formidable_fichiers.php + + - + message: "#^Constant _LOG_ERREUR not found\\.$#" + count: 12 + path: inc/formidable_fichiers.php + - message: "#^Function _T not found\\.$#" count: 5 @@ -1800,6 +1865,16 @@ parameters: count: 2 path: inc/formidable_fichiers.php + - + message: "#^Constant _LOG_INFO_IMPORTANTE not found\\.$#" + count: 1 + path: inc/formidable_migrer_depuis_ft.php + + - + message: "#^Constant _TIME_OUT not found\\.$#" + count: 4 + path: inc/formidable_migrer_depuis_ft.php + - message: "#^Function charger_fonction not found\\.$#" count: 2 @@ -2060,6 +2135,16 @@ parameters: count: 2 path: traiter/email.php + - + message: "#^Constant _LOG_ERREUR not found\\.$#" + count: 1 + path: traiter/enregistrement.php + + - + message: "#^Constant _LOG_INFO not found\\.$#" + count: 5 + path: traiter/enregistrement.php + - message: "#^Function _T not found\\.$#" count: 4 diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 7659909e..8877a6fa 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,10 +1,10 @@ # phpstan.neon.dist -#includes: -# - phpstan-baseline.neon +includes: + - phpstan-baseline.neon parameters: paths: - . excludePaths: analyseAndScan: - lang - level: 0 + level: 1 -- GitLab