fix phpstan

This commit is contained in:
Frédéric France 2025-02-19 20:28:18 +01:00
parent 3b47fa900b
commit bdb648e6cf
No known key found for this signature in database
GPG Key ID: CE25B0B7B53B9177
7 changed files with 12 additions and 48 deletions

View File

@ -1392,42 +1392,6 @@ parameters:
count: 1
path: ../../../htdocs/admin/knowledgemanagement.php
-
message: '#^Right side of && is always true\.$#'
identifier: booleanAnd.rightAlwaysTrue
count: 1
path: ../../../htdocs/admin/ldap.php
-
message: '#^Right side of && is always true\.$#'
identifier: booleanAnd.rightAlwaysTrue
count: 1
path: ../../../htdocs/admin/ldap_contacts.php
-
message: '#^Right side of && is always true\.$#'
identifier: booleanAnd.rightAlwaysTrue
count: 1
path: ../../../htdocs/admin/ldap_groups.php
-
message: '#^Right side of && is always true\.$#'
identifier: booleanAnd.rightAlwaysTrue
count: 1
path: ../../../htdocs/admin/ldap_members.php
-
message: '#^Right side of && is always true\.$#'
identifier: booleanAnd.rightAlwaysTrue
count: 1
path: ../../../htdocs/admin/ldap_members_types.php
-
message: '#^Right side of && is always true\.$#'
identifier: booleanAnd.rightAlwaysTrue
count: 1
path: ../../../htdocs/admin/ldap_users.php
-
message: '#^Parameter \#12 \$localtaxes_array of function calcul_price_total expects array\{string, int\|string, string, int\|string, string, string\}\|array\{string, int\|string, string, string\}, array\{\} given\.$#'
identifier: argument.type

View File

@ -5,7 +5,7 @@
* Copyright (C) 2005-2021 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2006-2020 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -66,7 +66,7 @@ if ($reshook < 0) {
}
if (empty($reshook)) {
if ($action == 'setvalue' && $user->admin) {
if ($action == 'setvalue' /* && $user->admin */) {
$error = 0;
$db->begin();

View File

@ -5,7 +5,7 @@
* Copyright (C) 2005 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -55,7 +55,7 @@ $action = GETPOST('action', 'aZ09');
* Actions
*/
if ($action == 'setvalue' && $user->admin) {
if ($action == 'setvalue' /* && $user->admin */) {
$error = 0;
$db->begin();

View File

@ -6,7 +6,7 @@
* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -58,7 +58,7 @@ $action = GETPOST('action', 'aZ09');
* Actions
*/
if ($action == 'setvalue' && $user->admin) {
if ($action == 'setvalue' /* && $user->admin */) {
$error = 0;
$db->begin();

View File

@ -5,7 +5,7 @@
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2006-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -56,7 +56,7 @@ $action = GETPOST('action', 'aZ09');
* Actions
*/
if ($action == 'setvalue' && $user->admin) {
if ($action == 'setvalue' /* && $user->admin */) {
$error = 0;
$db->begin();

View File

@ -5,7 +5,7 @@
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -57,7 +57,7 @@ $action = GETPOST('action', 'aZ09');
* Actions
*/
if ($action == 'setvalue' && $user->admin) {
if ($action == 'setvalue' /* && $user->admin */) {
$error = 0;
$db->begin();

View File

@ -7,7 +7,7 @@
* Copyright (C) 2011-2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2019 Abbes Bahfir <dolipar@dolipar.org>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -58,7 +58,7 @@ $action = GETPOST('action', 'aZ09');
* Actions
*/
if ($action == 'setvalue' && $user->admin) {
if ($action == 'setvalue' /* && $user->admin */) {
$error = 0;
$db->begin();