mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Qual: fix phpstan notices after fixing phan notices
This commit is contained in:
parent
4eeb0bdf58
commit
2e30ae50ac
|
|
@ -9,7 +9,7 @@
|
|||
*/
|
||||
return [
|
||||
// # Issue statistics:
|
||||
// PhanTypeMismatchArgument : 3560+ occurrences
|
||||
// PhanTypeMismatchArgument : 3540+ occurrences
|
||||
// PhanUndeclaredProperty : 530+ occurrences
|
||||
// PhanTypeMismatchArgumentNullable : 450+ occurrences
|
||||
// PhanUndeclaredGlobalVariable : 190+ occurrences
|
||||
|
|
@ -97,7 +97,6 @@ return [
|
|||
'htdocs/admin/bank.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/barcode.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/bom.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/boxes.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/chequereceipts.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/company.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/contract.php' => ['PhanTypeMismatchArgument'],
|
||||
|
|
@ -349,8 +348,6 @@ return [
|
|||
'htdocs/core/ajax/loadinplace.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/core/ajax/saveinplace.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable'],
|
||||
'htdocs/core/ajax/selectobject.php' => ['PhanTypeMismatchArgumentNullable'],
|
||||
'htdocs/core/boxes/box_produits.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/core/boxes/box_produits_alerte_stock.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/core/class/CMailFile.class.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable'],
|
||||
'htdocs/core/class/canvas.class.php' => ['PhanParamTooMany', 'PhanUndeclaredMethod'],
|
||||
'htdocs/core/class/ccountry.class.php' => ['PhanTypeMismatchArgument', 'PhanUndeclaredProperty'],
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2004-2022 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -471,7 +471,7 @@ print '</tr>';
|
|||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print $form->buttonsSaveCancel("Save", '', array(), 0, 'reposition');
|
||||
print $form->buttonsSaveCancel("Save", '', array(), false, 'reposition');
|
||||
|
||||
print '</form>';
|
||||
print "\n".'<!-- End Other Const -->'."\n";
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015-2023 Frederic France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -52,7 +52,7 @@ class box_produits extends ModeleBoxes
|
|||
$this->db = $db;
|
||||
|
||||
$listofmodulesforexternal = explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL'));
|
||||
$tmpentry = array('enabled' => (isModEnabled("product") || isModEnabled("service")), 'perms' => ($user->hasRight('produit', 'lire') || $user->hasRight('service', 'lire')), 'module' => 'product|service');
|
||||
$tmpentry = array('enabled' => (int) (isModEnabled("product") || isModEnabled("service")), 'perms' => (string) (int) ($user->hasRight('produit', 'lire') || $user->hasRight('service', 'lire')), 'module' => 'product|service');
|
||||
$showmode = isVisibleToUserType(($user->socid > 0 ? 1 : 0), $tmpentry, $listofmodulesforexternal);
|
||||
$this->hidden = ($showmode != 1);
|
||||
$this->urltoaddentry = DOL_URL_ROOT.'/product/card.php?action=create';
|
||||
|
|
@ -167,7 +167,7 @@ class box_produits extends ModeleBoxes
|
|||
$price = ($objp->price_base_type == 'HT') ? price($objp->price) : $price = price($objp->price_ttc);
|
||||
} else {
|
||||
//Parse the dynamic price
|
||||
$productstatic->fetch($objp->rowid, '', '', 1);
|
||||
$productstatic->fetch($objp->rowid, '', '', '1');
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php';
|
||||
$priceparser = new PriceParser($this->db);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2005-2012 Maxime Kohlhaas <mko@atm-consulting.fr>
|
||||
* Copyright (C) 2015-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -54,7 +54,7 @@ class box_produits_alerte_stock extends ModeleBoxes
|
|||
$this->db = $db;
|
||||
|
||||
$listofmodulesforexternal = explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL'));
|
||||
$tmpentry = array('enabled' => ((isModEnabled("product") || isModEnabled("service")) && isModEnabled('stock')), 'perms' => $user->hasRight('stock', 'lire'), 'module' => 'product|service|stock');
|
||||
$tmpentry = array('enabled' => (int) ((isModEnabled("product") || isModEnabled("service")) && isModEnabled('stock')), 'perms' => (string) (int) $user->hasRight('stock', 'lire'), 'module' => 'product|service|stock');
|
||||
$showmode = isVisibleToUserType(($user->socid > 0 ? 1 : 0), $tmpentry, $listofmodulesforexternal);
|
||||
$this->hidden = ($showmode != 1);
|
||||
$this->urltoaddentry = DOL_URL_ROOT.'/product/card.php?action=create';
|
||||
|
|
@ -163,7 +163,7 @@ class box_produits_alerte_stock extends ModeleBoxes
|
|||
$price_base_type = $langs->trans($objp->price_base_type);
|
||||
$price = ($objp->price_base_type == 'HT') ? price($objp->price) : $price = price($objp->price_ttc);
|
||||
} else { //Parse the dynamic price
|
||||
$productstatic->fetch($objp->rowid, '', '', 1);
|
||||
$productstatic->fetch($objp->rowid, '', '', '1');
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php';
|
||||
$priceparser = new PriceParser($this->db);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user