Skip to content
Extraits de code Groupes Projets
Valider 1e0e41a9 rédigé par RealET's avatar RealET :kissing_cat:
Parcourir les fichiers

build : phpstan level 4

parent 8234c9a4
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -662,7 +662,7 @@ function create_document($chemin, $objet, $mode, $champs = 'non', $id_document = ...@@ -662,7 +662,7 @@ function create_document($chemin, $objet, $mode, $champs = 'non', $id_document =
$type = ($objet['type'] ?? ''); $type = ($objet['type'] ?? '');
$id_objet = ($objet['id_objet'] ?? 0); $id_objet = ($objet['id_objet'] ?? 0);
spip_log(['tmp_name' => $chemin, 'name' => basename($chemin)], 'docusc'); spip_log(['tmp_name' => $chemin, 'name' => basename($chemin)], 'docusc');
if ($id_document = 'non' and $chemin) { if ($id_document == 'non' and $chemin) {
autoriser_exception('associerdocuments', $type, $id_objet); autoriser_exception('associerdocuments', $type, $id_objet);
$id_document = action_ajouter_un_document_dist('non', ['tmp_name' => $chemin, 'name' => basename($chemin)], $type, $id_objet, $mode); $id_document = action_ajouter_un_document_dist('non', ['tmp_name' => $chemin, 'name' => basename($chemin)], $type, $id_objet, $mode);
autoriser_exception('associerdocuments', $type, $id_objet, false); autoriser_exception('associerdocuments', $type, $id_objet, false);
...@@ -671,7 +671,8 @@ function create_document($chemin, $objet, $mode, $champs = 'non', $id_document = ...@@ -671,7 +671,8 @@ function create_document($chemin, $objet, $mode, $champs = 'non', $id_document =
} }
return $id_document; return $id_document;
} }
else { return false; else {
return false;
} }
} }
......
...@@ -74,8 +74,6 @@ if (defined('_DIR_PLUGIN_MAILSUBSCRIBERS')) { ...@@ -74,8 +74,6 @@ if (defined('_DIR_PLUGIN_MAILSUBSCRIBERS')) {
$listes = _request('listes'); $listes = _request('listes');
if ($listes and is_string($listes)) { if ($listes and is_string($listes)) {
$listes = explode(',', $listes); $listes = explode(',', $listes);
}
if ($listes and is_array($listes) and count($listes)) {
$options['listes'] = $listes; $options['listes'] = $listes;
} }
......
...@@ -1140,7 +1140,7 @@ $raz = $regs[1]; ...@@ -1140,7 +1140,7 @@ $raz = $regs[1];
$href = parametre_url($href, 'prive', $prive); $href = parametre_url($href, 'prive', $prive);
$href = parametre_url($href, 'ancre', $ancre); $href = parametre_url($href, 'ancre', $ancre);
$href = calendrier_args_date($href, $annee, $mois, $jour, '', "$arg_echelle" . ((DEFAUT_PARTIE == DEFAUT_PARTIE_R) ? '' : ('&partie_cal=' . DEFAUT_PARTIE_R))); $href = calendrier_args_date($href, $annee, $mois, $jour, '', "$arg_echelle");
$id = ($ancre ?: 'agenda') . '-nav'; $id = ($ancre ?: 'agenda') . '-nav';
$onmouseover = "if (!this.trimestre)\n{this.trimestre=!charger_node_url('$href', document.getElementById('$id'));}\n;$('#$id').css('visibility','visible').show();"; $onmouseover = "if (!this.trimestre)\n{this.trimestre=!charger_node_url('$href', document.getElementById('$id'));}\n;$('#$id').css('visibility','visible').show();";
...@@ -1404,7 +1404,7 @@ function http_calendrier_agenda_rv( ...@@ -1404,7 +1404,7 @@ function http_calendrier_agenda_rv(
(($jour_semaine == 1) ? " calendrier-$spip_lang_left" : (($jour_semaine == 1) ? " calendrier-$spip_lang_left" :
(($jour_semaine == 7) ? " calendrier-$spip_lang_right" : (($jour_semaine == 7) ? " calendrier-$spip_lang_right" :
'')); ''));
$type = ($semaine ? 'semaine' : 'jour') ; $type = 'semaine';
} else { } else {
if ($j == $jour_today and $cemois) { if ($j == $jour_today and $cemois) {
$toile = ' jour_encours'; $toile = ' jour_encours';
...@@ -1425,8 +1425,7 @@ function http_calendrier_agenda_rv( ...@@ -1425,8 +1425,7 @@ function http_calendrier_agenda_rv(
$corps = $fclic($script, $annee, $mois, $j, $type, '', $ancre, '', $title, '', '', $j); $corps = $fclic($script, $annee, $mois, $j, $type, '', $ancre, '', $title, '', '', $j);
$ligne .= "\n<td class='$class'>$corps</td>"; $ligne .= "\n<td class='$class'>$corps</td>";
if ($jour_semaine == 7) { if ($jour_semaine == 7) {
if ($ligne) { $total .= "\n<tr>$ligne</tr>"; $total .= "\n<tr>$ligne</tr>";
}
$ligne = ''; $ligne = '';
} }
} }
......
...@@ -875,6 +875,11 @@ parameters: ...@@ -875,6 +875,11 @@ parameters:
count: 1 count: 1
path: soyezcreateurs_fonctions.php path: soyezcreateurs_fonctions.php
-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
count: 1
path: soyezcreateurs_fonctions.php
- -
message: "#^Access to property \\$texte on an unknown class Texte\\.$#" message: "#^Access to property \\$texte on an unknown class Texte\\.$#"
count: 4 count: 4
......
...@@ -7,6 +7,6 @@ parameters: ...@@ -7,6 +7,6 @@ parameters:
excludePaths: excludePaths:
analyseAndScan: analyseAndScan:
- lang - lang
level: 3 level: 4
bootstrapFiles: bootstrapFiles:
- phpstan-constants.php - phpstan-constants.php
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter