Skip to content

Commit

Permalink
Merge pull request #4 from kent1D/dev/phpstan
Browse files Browse the repository at this point in the history
 introduction d'une baseline phpstan & fix de divers warnings
  • Loading branch information
kent1D committed Mar 22, 2023
2 parents bce312e + 15ca8ce commit 5bd004a
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hal_auteurs_pipelines.php
Expand Up @@ -122,6 +122,8 @@ function hal_auteurs_post_edition($flux) {
foreach ($hals as $hal) {
// authid
$hal = trim($hal);
$id_hal = null;
$set = [];
if (is_numeric($hal) and $hal > 0) {
$id_hal = sql_fetsel('statut,id_hal', 'spip_hals', 'authid = ' . intval($hal));
$set = ['authid' => $hal,'statut' => 'publie'];
Expand Down
81 changes: 81 additions & 0 deletions phpstan-baseline.neon
@@ -0,0 +1,81 @@
parameters:
ignoreErrors:
-
message: "#^Function effacer_meta not found\\.$#"
count: 1
path: hal_auteurs_administrations.php

-
message: "#^Function include_spip not found\\.$#"
count: 1
path: hal_auteurs_administrations.php

-
message: "#^Function maj_plugin not found\\.$#"
count: 1
path: hal_auteurs_administrations.php

-
message: "#^Function _T not found\\.$#"
count: 2
path: hal_auteurs_pipelines.php

-
message: "#^Function _request not found\\.$#"
count: 1
path: hal_auteurs_pipelines.php

-
message: "#^Function autoriser not found\\.$#"
count: 1
path: hal_auteurs_pipelines.php

-
message: "#^Function hal_inserer not found\\.$#"
count: 1
path: hal_auteurs_pipelines.php

-
message: "#^Function hal_modifier not found\\.$#"
count: 2
path: hal_auteurs_pipelines.php

-
message: "#^Function include_spip not found\\.$#"
count: 3
path: hal_auteurs_pipelines.php

-
message: "#^Function objet_associer not found\\.$#"
count: 1
path: hal_auteurs_pipelines.php

-
message: "#^Function objet_dissocier not found\\.$#"
count: 2
path: hal_auteurs_pipelines.php

-
message: "#^Function recuperer_fond not found\\.$#"
count: 2
path: hal_auteurs_pipelines.php

-
message: "#^Function sql_fetch not found\\.$#"
count: 1
path: hal_auteurs_pipelines.php

-
message: "#^Function sql_fetsel not found\\.$#"
count: 2
path: hal_auteurs_pipelines.php

-
message: "#^Function sql_getfetsel not found\\.$#"
count: 2
path: hal_auteurs_pipelines.php

-
message: "#^Function sql_select not found\\.$#"
count: 1
path: hal_auteurs_pipelines.php
10 changes: 10 additions & 0 deletions phpstan.neon.dist
@@ -0,0 +1,10 @@
includes:
- phpstan-baseline.neon

parameters:
paths:
- .
excludePaths:
analyseAndScan:
- lang
level: 3

0 comments on commit 5bd004a

Please sign in to comment.