From 8a3745c00ad4cce3fb7a97470089f8ef6f4a2f71 Mon Sep 17 00:00:00 2001 From: b_b Date: Wed, 30 Mar 2022 15:35:23 +0200 Subject: [PATCH] phpstan : le fichier de conf + la baseline ajout d'un fichier .gitattributes afin d'ignorer ces fichiers lors de l'export en zip ref #32 --- .gitattributes | 2 + phpstan-baseline.neon | 687 ++++++++++++++++++++++++++++++++++++++++++ phpstan.neon.dist | 12 + 3 files changed, 701 insertions(+) create mode 100644 .gitattributes create mode 100644 phpstan-baseline.neon create mode 100644 phpstan.neon.dist diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..69c1f29 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +/phpstan.neon.dist export-ignore +/phpstan-baseline.neon export-ignore \ No newline at end of file diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon new file mode 100644 index 0000000..8b8c881 --- /dev/null +++ b/phpstan-baseline.neon @@ -0,0 +1,687 @@ +parameters: + ignoreErrors: + - + message: "#^Function _L not found\\.$#" + count: 1 + path: action/editer_gis.php + + - + message: "#^Function autoriser not found\\.$#" + count: 2 + path: action/editer_gis.php + + - + message: "#^Function charger_fonction not found\\.$#" + count: 1 + path: action/editer_gis.php + + - + message: "#^Function collecter_requests not found\\.$#" + count: 2 + path: action/editer_gis.php + + - + message: "#^Function include_spip not found\\.$#" + count: 8 + path: action/editer_gis.php + + - + message: "#^Function objet_associer not found\\.$#" + count: 1 + path: action/editer_gis.php + + - + message: "#^Function objet_dissocier not found\\.$#" + count: 1 + path: action/editer_gis.php + + - + message: "#^Function objet_info not found\\.$#" + count: 1 + path: action/editer_gis.php + + - + message: "#^Function objet_modifier_champs not found\\.$#" + count: 1 + path: action/editer_gis.php + + - + message: "#^Function pipeline not found\\.$#" + count: 2 + path: action/editer_gis.php + + - + message: "#^Function sql_delete not found\\.$#" + count: 2 + path: action/editer_gis.php + + - + message: "#^Function sql_getfetsel not found\\.$#" + count: 1 + path: action/editer_gis.php + + - + message: "#^Function sql_insertq not found\\.$#" + count: 1 + path: action/editer_gis.php + + - + message: "#^Function suivre_invalideur not found\\.$#" + count: 3 + path: action/editer_gis.php + + - + message: "#^Function autoriser not found\\.$#" + count: 1 + path: action/editer_lien_gis.php + + - + message: "#^Function charger_fonction not found\\.$#" + count: 1 + path: action/editer_lien_gis.php + + - + message: "#^Function include_spip not found\\.$#" + count: 2 + path: action/editer_lien_gis.php + + - + message: "#^Function _request not found\\.$#" + count: 1 + path: action/gis_geocoder_rechercher.php + + - + message: "#^Function collecter_requests not found\\.$#" + count: 1 + path: action/gis_geocoder_rechercher.php + + - + message: "#^Function include_spip not found\\.$#" + count: 2 + path: action/gis_geocoder_rechercher.php + + - + message: "#^Function _request not found\\.$#" + count: 2 + path: action/kml_infos.php + + - + message: "#^Function charger_fonction not found\\.$#" + count: 2 + path: action/kml_infos.php + + - + message: "#^Function document_modifier not found\\.$#" + count: 1 + path: action/kml_infos.php + + - + message: "#^Function include_spip not found\\.$#" + count: 5 + path: action/kml_infos.php + + - + message: "#^Function spip_log not found\\.$#" + count: 3 + path: action/kml_infos.php + + - + message: "#^Function sql_getfetsel not found\\.$#" + count: 2 + path: action/kml_infos.php + + - + message: "#^Undefined variable\\: \\$config$#" + count: 2 + path: action/kml_infos.php + + - + message: "#^Function autoriser not found\\.$#" + count: 1 + path: action/supprimer_gis.php + + - + message: "#^Function charger_fonction not found\\.$#" + count: 1 + path: action/supprimer_gis.php + + - + message: "#^Function include_spip not found\\.$#" + count: 2 + path: action/supprimer_gis.php + + - + message: "#^Function _L not found\\.$#" + count: 1 + path: crud/gis.php + + - + message: "#^Function _T not found\\.$#" + count: 2 + path: crud/gis.php + + - + message: "#^Function autoriser not found\\.$#" + count: 3 + path: crud/gis.php + + - + message: "#^Function include_spip not found\\.$#" + count: 1 + path: crud/gis.php + + - + message: "#^Function sql_getfetsel not found\\.$#" + count: 1 + path: crud/gis.php + + - + message: "#^Function include_spip not found\\.$#" + count: 1 + path: embed/kml_fonctions.php + + - + message: "#^Function _T not found\\.$#" + count: 1 + path: formulaires/configurer_gis.php + + - + message: "#^Function _request not found\\.$#" + count: 4 + path: formulaires/configurer_gis.php + + - + message: "#^Function include_spip not found\\.$#" + count: 1 + path: formulaires/configurer_gis.php + + - + message: "#^Function lire_config not found\\.$#" + count: 1 + path: formulaires/configurer_gis.php + + - + message: "#^Function refuser_traiter_formulaire_ajax not found\\.$#" + count: 1 + path: formulaires/configurer_gis.php + + - + message: "#^Function _request not found\\.$#" + count: 1 + path: formulaires/editer_gis.php + + - + message: "#^Function formulaires_editer_objet_charger not found\\.$#" + count: 1 + path: formulaires/editer_gis.php + + - + message: "#^Function formulaires_editer_objet_traiter not found\\.$#" + count: 1 + path: formulaires/editer_gis.php + + - + message: "#^Function formulaires_editer_objet_verifier not found\\.$#" + count: 1 + path: formulaires/editer_gis.php + + - + message: "#^Function id_table_objet not found\\.$#" + count: 1 + path: formulaires/editer_gis.php + + - + message: "#^Function include_spip not found\\.$#" + count: 3 + path: formulaires/editer_gis.php + + - + message: "#^Function parametre_url not found\\.$#" + count: 1 + path: formulaires/editer_gis.php + + - + message: "#^Function _request not found\\.$#" + count: 19 + path: formulaires/gis_inserer_modeles_traiter.php + + - + message: "#^Function _request not found\\.$#" + count: 1 + path: formulaires/rechercher_gis.php + + - + message: "#^Function include_spip not found\\.$#" + count: 2 + path: formulaires/rechercher_gis.php + + - + message: "#^Function effacer_meta not found\\.$#" + count: 2 + path: gis_administrations.php + + - + message: "#^Function include_spip not found\\.$#" + count: 2 + path: gis_administrations.php + + - + message: "#^Function maj_plugin not found\\.$#" + count: 1 + path: gis_administrations.php + + - + message: "#^Function sql_drop_table not found\\.$#" + count: 2 + path: gis_administrations.php + + - + message: "#^Function sql_fetch not found\\.$#" + count: 2 + path: gis_administrations.php + + - + message: "#^Function sql_getfetsel not found\\.$#" + count: 1 + path: gis_administrations.php + + - + message: "#^Function sql_select not found\\.$#" + count: 2 + path: gis_administrations.php + + - + message: "#^Function autoriser not found\\.$#" + count: 7 + path: gis_autoriser.php + + - + message: "#^Function id_table_objet not found\\.$#" + count: 1 + path: gis_autoriser.php + + - + message: "#^Function include_spip not found\\.$#" + count: 1 + path: gis_autoriser.php + + - + message: "#^Function lister_tables_objets_sql not found\\.$#" + count: 1 + path: gis_autoriser.php + + - + message: "#^Function sql_fetch not found\\.$#" + count: 1 + path: gis_autoriser.php + + - + message: "#^Function sql_getfetsel not found\\.$#" + count: 1 + path: gis_autoriser.php + + - + message: "#^Function sql_in not found\\.$#" + count: 1 + path: gis_autoriser.php + + - + message: "#^Function sql_select not found\\.$#" + count: 1 + path: gis_autoriser.php + + - + message: "#^Function table_objet_sql not found\\.$#" + count: 1 + path: gis_autoriser.php + + - + message: "#^Function calculer_argument_precedent not found\\.$#" + count: 3 + path: gis_fonctions.php + + - + message: "#^Function calculer_liste not found\\.$#" + count: 3 + path: gis_fonctions.php + + - + message: "#^Function champ_sql not found\\.$#" + count: 1 + path: gis_fonctions.php + + - + message: "#^Function charger_fonction not found\\.$#" + count: 1 + path: gis_fonctions.php + + - + message: "#^Function copie_locale not found\\.$#" + count: 1 + path: gis_fonctions.php + + - + message: "#^Function extraire_attribut not found\\.$#" + count: 3 + path: gis_fonctions.php + + - + message: "#^Function filtrer not found\\.$#" + count: 3 + path: gis_fonctions.php + + - + message: "#^Function find_in_path not found\\.$#" + count: 2 + path: gis_fonctions.php + + - + message: "#^Function generer_url_entite not found\\.$#" + count: 1 + path: gis_fonctions.php + + - + message: "#^Function id_table_objet not found\\.$#" + count: 1 + path: gis_fonctions.php + + - + message: "#^Function include_spip not found\\.$#" + count: 5 + path: gis_fonctions.php + + - + message: "#^Function largeur not found\\.$#" + count: 1 + path: gis_fonctions.php + + - + message: "#^Function lire_config not found\\.$#" + count: 1 + path: gis_fonctions.php + + - + message: "#^Function lister_tables_objets_sql not found\\.$#" + count: 1 + path: gis_fonctions.php + + - + message: "#^Function objet_info not found\\.$#" + count: 1 + path: gis_fonctions.php + + - + message: "#^Function objet_type not found\\.$#" + count: 2 + path: gis_fonctions.php + + - + message: "#^Function pipeline not found\\.$#" + count: 1 + path: gis_fonctions.php + + - + message: "#^Function rindex_pile not found\\.$#" + count: 10 + path: gis_fonctions.php + + - + message: "#^Function sql_fetsel not found\\.$#" + count: 2 + path: gis_fonctions.php + + - + message: "#^Function taille_image not found\\.$#" + count: 2 + path: gis_fonctions.php + + - + message: "#^Function url_absolue not found\\.$#" + count: 3 + path: gis_fonctions.php + + - + message: "#^Function find_in_path not found\\.$#" + count: 1 + path: gis_options.php + + - + message: "#^Function _T not found\\.$#" + count: 1 + path: gis_pipelines.php + + - + message: "#^Function _request not found\\.$#" + count: 1 + path: gis_pipelines.php + + - + message: "#^Function charger_fonction not found\\.$#" + count: 1 + path: gis_pipelines.php + + - + message: "#^Function direction_css not found\\.$#" + count: 3 + path: gis_pipelines.php + + - + message: "#^Function document_modifier not found\\.$#" + count: 1 + path: gis_pipelines.php + + - + message: "#^Function find_in_path not found\\.$#" + count: 8 + path: gis_pipelines.php + + - + message: "#^Function get_spip_doc not found\\.$#" + count: 1 + path: gis_pipelines.php + + - + message: "#^Function include_spip not found\\.$#" + count: 15 + path: gis_pipelines.php + + - + message: "#^Function lire_config not found\\.$#" + count: 2 + path: gis_pipelines.php + + - + message: "#^Function objet_optimiser_liens not found\\.$#" + count: 1 + path: gis_pipelines.php + + - + message: "#^Function purger_repertoire not found\\.$#" + count: 1 + path: gis_pipelines.php + + - + message: "#^Function recuperer_fond not found\\.$#" + count: 1 + path: gis_pipelines.php + + - + message: "#^Function set_request not found\\.$#" + count: 1 + path: gis_pipelines.php + + - + message: "#^Function sinon not found\\.$#" + count: 4 + path: gis_pipelines.php + + - + message: "#^Function spip_log not found\\.$#" + count: 6 + path: gis_pipelines.php + + - + message: "#^Function sql_fetsel not found\\.$#" + count: 1 + path: gis_pipelines.php + + - + message: "#^Function sql_getfetsel not found\\.$#" + count: 3 + path: gis_pipelines.php + + - + message: "#^Function suivre_invalideur not found\\.$#" + count: 2 + path: gis_pipelines.php + + - + message: "#^Function table_objet_sql not found\\.$#" + count: 2 + path: gis_pipelines.php + + - + message: "#^Function include_spip not found\\.$#" + count: 1 + path: inc/gis_geocode.php + + - + message: "#^Function recuperer_url not found\\.$#" + count: 1 + path: inc/gis_geocode.php + + - + message: "#^Function _T not found\\.$#" + count: 2 + path: inc/gis_xmlrpc.php + + - + message: "#^Function attribut_html not found\\.$#" + count: 2 + path: inc/gis_xmlrpc.php + + - + message: "#^Function autoriser not found\\.$#" + count: 1 + path: inc/gis_xmlrpc.php + + - + message: "#^Function charger_fonction not found\\.$#" + count: 1 + path: inc/gis_xmlrpc.php + + - + message: "#^Function include_spip not found\\.$#" + count: 1 + path: inc/gis_xmlrpc.php + + - + message: "#^Function quete_logo not found\\.$#" + count: 1 + path: inc/gis_xmlrpc.php + + - + message: "#^Function sql_fetch not found\\.$#" + count: 1 + path: inc/gis_xmlrpc.php + + - + message: "#^Function sql_fetsel not found\\.$#" + count: 1 + path: inc/gis_xmlrpc.php + + - + message: "#^Function sql_quote not found\\.$#" + count: 1 + path: inc/gis_xmlrpc.php + + - + message: "#^Function sql_select not found\\.$#" + count: 1 + path: inc/gis_xmlrpc.php + + - + message: "#^Function url_absolue not found\\.$#" + count: 1 + path: inc/gis_xmlrpc.php + + - + message: "#^Function wkt_to_json not found\\.$#" + count: 1 + path: inc/gis_xmlrpc.php + + - + message: "#^Instantiated class IXR_Error not found\\.$#" + count: 2 + path: inc/gis_xmlrpc.php + + - + message: "#^Undefined variable\\: \\$wkt$#" + count: 1 + path: inc/gis_xmlrpc.php + + - + message: "#^Function extraire_attribut not found\\.$#" + count: 4 + path: inc/kml_infos.php + + - + message: "#^Function get_spip_doc not found\\.$#" + count: 1 + path: inc/kml_infos.php + + - + message: "#^Function include_spip not found\\.$#" + count: 4 + path: inc/kml_infos.php + + - + message: "#^Function lire_fichier not found\\.$#" + count: 2 + path: inc/kml_infos.php + + - + message: "#^Function spip_xml_match_nodes not found\\.$#" + count: 6 + path: inc/kml_infos.php + + - + message: "#^Function spip_xml_parse not found\\.$#" + count: 2 + path: inc/kml_infos.php + + - + message: "#^Function sql_fetsel not found\\.$#" + count: 1 + path: inc/kml_infos.php + + - + message: "#^Function supprimer_fichier not found\\.$#" + count: 1 + path: inc/kml_infos.php + + - + message: "#^Instantiated class PclZip not found\\.$#" + count: 1 + path: inc/kml_infos.php + + - + message: "#^Function include_spip not found\\.$#" + count: 1 + path: prive/objets/liste/gis_associer_fonctions.php + + - + message: "#^Function include_spip not found\\.$#" + count: 1 + path: prive/objets/liste/gis_lies_fonctions.php + + - + message: "#^Function find_in_path not found\\.$#" + count: 1 + path: tests/gis_connect_sql.php + + - + message: "#^Function tester_fun not found\\.$#" + count: 1 + path: tests/gis_connect_sql.php + diff --git a/phpstan.neon.dist b/phpstan.neon.dist new file mode 100644 index 0000000..0f1c0cc --- /dev/null +++ b/phpstan.neon.dist @@ -0,0 +1,12 @@ +includes: + - phpstan-baseline.neon + +parameters: + paths: + - . + excludePaths: + analyseAndScan: + - lang + analyse: + - inc/iptc.php + level: 0