fix phpstan expects values (#30324)
* fix phpstan expects values * fix phpstan expects values
This commit is contained in:
parent
6601503edc
commit
94feb2cfa7
12 changed files with 44 additions and 42 deletions
|
|
@ -7,6 +7,7 @@
|
|||
* Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
|
||||
* Copyright (C) 2020 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||
* Copyright (C) 2024 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -580,7 +581,7 @@ if ($type == Categorie::TYPE_PRODUCT) {
|
|||
print '</form>'."\n";
|
||||
}
|
||||
} else {
|
||||
print_barre_liste($langs->trans("ProductsAndServices"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'products');
|
||||
print_barre_liste($langs->trans("ProductsAndServices"), null, $_SERVER["PHP_SELF"], '', '', '', '', 0, '', 'products');
|
||||
accessforbidden("NotEnoughPermissions", 0, 0);
|
||||
}
|
||||
}
|
||||
|
|
@ -667,7 +668,7 @@ if ($type == Categorie::TYPE_CUSTOMER) {
|
|||
print '</form>'."\n";
|
||||
}
|
||||
} else {
|
||||
print_barre_liste($langs->trans("Customers"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'companies');
|
||||
print_barre_liste($langs->trans("Customers"), null, $_SERVER["PHP_SELF"], '', '', '', '', 0, '', 'companies');
|
||||
accessforbidden("NotEnoughPermissions", 0, 0);
|
||||
}
|
||||
}
|
||||
|
|
@ -756,7 +757,7 @@ if ($type == Categorie::TYPE_SUPPLIER) {
|
|||
print '</form>'."\n";
|
||||
}
|
||||
} else {
|
||||
print_barre_liste($langs->trans("Suppliers"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'companies');
|
||||
print_barre_liste($langs->trans("Suppliers"), null, $_SERVER["PHP_SELF"], '', '', '', '', 0, '', 'companies');
|
||||
accessforbidden("NotEnoughPermissions", 0, 0);
|
||||
}
|
||||
}
|
||||
|
|
@ -847,7 +848,7 @@ if ($type == Categorie::TYPE_MEMBER) {
|
|||
print '</form>'."\n";
|
||||
}
|
||||
} else {
|
||||
print_barre_liste($langs->trans("Member"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'members');
|
||||
print_barre_liste($langs->trans("Member"), null, $_SERVER["PHP_SELF"], '', '', '', '', 0, '', 'members');
|
||||
accessforbidden("NotEnoughPermissions", 0, 0);
|
||||
}
|
||||
}
|
||||
|
|
@ -940,7 +941,7 @@ if ($type == Categorie::TYPE_CONTACT) {
|
|||
print '</form>'."\n";
|
||||
}
|
||||
} else {
|
||||
print_barre_liste($langs->trans("Contact"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'contact');
|
||||
print_barre_liste($langs->trans("Contact"), null, $_SERVER["PHP_SELF"], '', '', '', '', 0, '', 'contact');
|
||||
accessforbidden("NotEnoughPermissions", 0, 0);
|
||||
}
|
||||
}
|
||||
|
|
@ -1030,7 +1031,7 @@ if ($type == Categorie::TYPE_ACCOUNT) {
|
|||
print '</form>'."\n";
|
||||
}
|
||||
} else {
|
||||
print_barre_liste($langs->trans("Banque"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'bank');
|
||||
print_barre_liste($langs->trans("Banque"), null, $_SERVER["PHP_SELF"], '', '', '', '', 0, '', 'bank');
|
||||
accessforbidden("NotEnoughPermissions", 0, 0);
|
||||
}
|
||||
}
|
||||
|
|
@ -1120,7 +1121,7 @@ if ($type == Categorie::TYPE_PROJECT) {
|
|||
print '</form>'."\n";
|
||||
}
|
||||
} else {
|
||||
print_barre_liste($langs->trans("Project"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'project');
|
||||
print_barre_liste($langs->trans("Project"), null, $_SERVER["PHP_SELF"], '', '', '', '', 0, '', 'project');
|
||||
accessforbidden("NotEnoughPermissions", 0, 0);
|
||||
}
|
||||
}
|
||||
|
|
@ -1204,7 +1205,7 @@ if ($type == Categorie::TYPE_USER) {
|
|||
print '</form>'."\n";
|
||||
}
|
||||
} else {
|
||||
print_barre_liste($langs->trans("Users"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'user');
|
||||
print_barre_liste($langs->trans("Users"), null, $_SERVER["PHP_SELF"], '', '', '', '', 0, '', 'user');
|
||||
accessforbidden("NotEnoughPermissions", 0, 0);
|
||||
}
|
||||
}
|
||||
|
|
@ -1275,7 +1276,7 @@ if ($type == Categorie::TYPE_WAREHOUSE) {
|
|||
print '</form>'."\n";
|
||||
}
|
||||
} else {
|
||||
print_barre_liste($langs->trans("Warehouse"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'stock');
|
||||
print_barre_liste($langs->trans("Warehouse"), null, $_SERVER["PHP_SELF"], '', '', '', '', 0, '', 'stock');
|
||||
accessforbidden("NotEnoughPermissions", 0, 0);
|
||||
}
|
||||
}
|
||||
|
|
@ -1363,7 +1364,7 @@ if ($type == Categorie::TYPE_TICKET) {
|
|||
print '</form>'."\n";
|
||||
}
|
||||
} else {
|
||||
print_barre_liste($langs->trans("Ticket"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'ticket');
|
||||
print_barre_liste($langs->trans("Ticket"), null, $_SERVER["PHP_SELF"], '', '', '', '', 0, '', 'ticket');
|
||||
accessforbidden("NotEnoughPermissions", 0, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Cedric GROSS <c.gross@kreiz-it.fr>
|
||||
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2023 Florian HENRY <florian.henry@scopen.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
|
|
@ -508,7 +508,7 @@ if ($user->hasRight('agenda', 'myactions', 'create') || $user->hasRight('agenda'
|
|||
$newcardbutton .= dolGetButtonTitle($langs->trans("AddAction"), '', 'fa fa-plus-circle', $urltocreateaction);
|
||||
}
|
||||
|
||||
$num = '';
|
||||
$num = 0;
|
||||
|
||||
print_barre_liste($langs->trans("Agenda"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, -1, 'object_action', 0, $nav.'<span class="marginleftonly"></span>'.$newcardbutton, '', $limit, 1, 0, 1, $viewmode);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
/* Copyright (C) 2015-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018-2021 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2018 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2019 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
/* Copyright (C) 2015-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018-2021 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2018 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2019 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 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
|
||||
|
|
|
|||
|
|
@ -42,14 +42,14 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
|||
* @param integer $paymentdateafter Payment after date (must includes hour)
|
||||
* @param integer $paymentdatebefore Payment before date (must includes hour)
|
||||
* @param int $usestdout Add information onto standard output
|
||||
* @param int $regenerate ''=Use existing PDF files, 'nameofpdf'=Regenerate all PDF files using the template
|
||||
* @param string $regenerate ''=Use existing PDF files, 'nameofpdf'=Regenerate all PDF files using the template
|
||||
* @param string $filesuffix Suffix to add into file name of generated PDF
|
||||
* @param string $paymentbankid Only if payment on this bank account id
|
||||
* @param array $thirdpartiesid List of thirdparties id when using filter=excludethirdpartiesid or filter=onlythirdpartiesid
|
||||
* @param string $fileprefix Prefix to add into filename of generated PDF
|
||||
* @return int Error code
|
||||
*/
|
||||
function rebuild_merge_pdf($db, $langs, $conf, $diroutputpdf, $newlangid, $filter, $dateafterdate, $datebeforedate, $paymentdateafter, $paymentdatebefore, $usestdout, $regenerate = 0, $filesuffix = '', $paymentbankid = '', $thirdpartiesid = [], $fileprefix = 'mergedpdf')
|
||||
function rebuild_merge_pdf($db, $langs, $conf, $diroutputpdf, $newlangid, $filter, $dateafterdate, $datebeforedate, $paymentdateafter, $paymentdatebefore, $usestdout, $regenerate = '', $filesuffix = '', $paymentbankid = '', $thirdpartiesid = [], $fileprefix = 'mergedpdf')
|
||||
{
|
||||
$sql = "SELECT DISTINCT f.rowid, f.ref";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||
|
|
|
|||
|
|
@ -1380,14 +1380,14 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
|
|||
/**
|
||||
* Show linked objects for PDF generation
|
||||
*
|
||||
* @param TCPDF $pdf Object PDF
|
||||
* @param TCPDF $pdf Object PDF
|
||||
* @param object $object Object
|
||||
* @param Translate $outputlangs Object lang
|
||||
* @param int $posx X
|
||||
* @param int $posy Y
|
||||
* @param float $w Width of cells. If 0, they extend up to the right margin of the page.
|
||||
* @param float $h Cell minimum height. The cell extends automatically if needed.
|
||||
* @param int $align Align
|
||||
* @param string $align Align
|
||||
* @param string $default_font_size Font size
|
||||
* @return float The Y PDF position
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ print '<input type="hidden" name="page" value="'.$page.'">';
|
|||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
$title = $langs->trans("MenuConfCP");
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $massactionbutton, '', '', 'title_hrm', 0, '', '', $limit, 0, 0, 1);
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $massactionbutton, 0, '', 'title_hrm', 0, '', '', $limit, 0, 0, 1);
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* Copyright (C) 2021 Greg Rastklan <greg.rastklan@atm-consulting.fr>
|
||||
* Copyright (C) 2021 Jean-Pascal BOUDET <jean-pascal.boudet@atm-consulting.fr>
|
||||
* Copyright (C) 2021 Grégory BLEMAND <gregory.blemand@atm-consulting.fr>
|
||||
* Copyright (C) 2023 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2023-2024 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
|
||||
|
|
@ -632,7 +632,7 @@ if ($action != "create" && $action != "edit") {
|
|||
$massactionbutton = "";
|
||||
//$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/hrm/skilldet_card.php', 1) . '?action=create&backtopage=' . urlencode($_SERVER['PHP_SELF']) . $param_fk . '&backtopage=' . $backtopage, '', $permissiontoadd);
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_' . $object->picto, 0, "", '', '', 0, 0, 1);
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_' . $object->picto, 0, '', '', 0, 0, 0, 1);
|
||||
|
||||
// Add code for pre mass action (confirmation or email presend form)
|
||||
$topicmail = "SendSkilldetRef";
|
||||
|
|
|
|||
|
|
@ -4361,7 +4361,7 @@ if ($module == 'initmodule') {
|
|||
$newproperty = dolGetButtonTitle($langs->trans('NewProperty'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/modulebuilder/index.php?tab=objects&module='.urlencode($module).'&tabobj=createproperty&obj='.urlencode($tabobj));
|
||||
$nbOfProperties = count($reflectorpropdefault['fields']);
|
||||
|
||||
print_barre_liste($langs->trans("ObjectProperties"), 0, $_SERVER["PHP_SELF"], '', '', '', '', '', $nbOfProperties, '', 0, $newproperty, '', '', 0, 0, 1);
|
||||
print_barre_liste($langs->trans("ObjectProperties"), 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, $nbOfProperties, '', 0, $newproperty, '', 0, 0, 0, 1);
|
||||
|
||||
//var_dump($reflectorpropdefault);exit;
|
||||
print '<!-- Table with properties of object -->'."\n";
|
||||
|
|
@ -4802,7 +4802,7 @@ if ($module == 'initmodule') {
|
|||
|
||||
|
||||
$newdict = dolGetButtonTitle($langs->trans('NewDictionary'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/modulebuilder/index.php?tab=dictionaries&module='.urlencode($module).'&tabdic=newdictionary');
|
||||
print_barre_liste($langs->trans("ListOfDictionariesEntries"), '', $_SERVER["PHP_SELF"], '', '', '', '', '', '', '', 0, $newdict, '', '', 0, 0, 1);
|
||||
print_barre_liste($langs->trans("ListOfDictionariesEntries"), '', $_SERVER["PHP_SELF"], '', '', '', '', 0, '', '', 0, $newdict, '', 0, 0, 0, 1);
|
||||
|
||||
if ($tabdic != 'newdictionary') {
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2008-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2007 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -29,7 +30,7 @@
|
|||
/**
|
||||
* Create a redirect form to paybox form
|
||||
*
|
||||
* @param int $PRICE Price
|
||||
* @param float $PRICE Price
|
||||
* @param string $CURRENCY Currency
|
||||
* @param string $EMAIL EMail
|
||||
* @param string $urlok Url to go back if payment is OK
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
* Copyright (C) 2018-2021 Thibault FOUCART <support@ptibogxiv.net>
|
||||
* Copyright (C) 2021 Waël Almoman <info@almoman.com>
|
||||
* Copyright (C) 2021 Dorian Vabre <dorian.vabre@gmail.com>
|
||||
* Copyright (C) 2024 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
|
||||
|
|
@ -465,7 +466,7 @@ if ($action == 'dopayment') {
|
|||
dol_syslog("newpayment.php call paybox api and do redirect", LOG_DEBUG);
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/paybox/lib/paybox.lib.php';
|
||||
print_paybox_redirect($PRICE, $conf->currency, $email, $urlok, $urlko, $FULLTAG);
|
||||
print_paybox_redirect((float) $PRICE, $conf->currency, $email, $urlok, $urlko, $FULLTAG);
|
||||
|
||||
session_destroy();
|
||||
exit;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
<?php
|
||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005 Brice Davoleau <brice.davoleau@gmail.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2006-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2018 Florain Henry <florian.henry@open-concept.pro
|
||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005 Brice Davoleau <brice.davoleau@gmail.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2006-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2018 Florain Henry <florian.henry@open-concept.pro
|
||||
* Copyright (C) 2024 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
|
||||
|
|
@ -177,7 +178,7 @@ if ($object->id > 0) {
|
|||
$param .= '&limit='.((int) $limit);
|
||||
}
|
||||
|
||||
print_barre_liste($langs->trans("ActionsOnResource"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', '', '', '', 0, 1, 1);
|
||||
print_barre_liste($langs->trans("ActionsOnResource"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, '', '', 0, 1, 1);
|
||||
|
||||
// List of all actions
|
||||
$filters = array();
|
||||
|
|
|
|||
|
|
@ -62,21 +62,19 @@ parameters:
|
|||
- '#.*phan-var#'
|
||||
- '#\$httpStatusCode of class Luracast\\Restler\\RestException constructor expects string, int given.#'
|
||||
- '#expects \(callable#'
|
||||
- '#expects bool#'
|
||||
- '#expects bool, int given.#'
|
||||
- '#expects bool\|string#'
|
||||
- '#expects bool, int#'
|
||||
- '#expects bool, string given.#'
|
||||
- '#expects int\|#'
|
||||
- '#expects int\|#'
|
||||
- '#expects int<-2, 2>, bool given.#'
|
||||
- '#expects int<0, 1>#'
|
||||
- '#print.* expects int, string#'
|
||||
- '#load.* expects int, string#'
|
||||
- '#ajax.* expects int, string#'
|
||||
- '#measu.* expects int, string#'
|
||||
- '#color.* expects int, string#'
|
||||
- '#imap.* expects int, string#'
|
||||
- '#show.* expects int, string#'
|
||||
- '#pdf.* expects int, string#'
|
||||
- '#dol.* expects int, string#'
|
||||
- '#get.* expects int, string#'
|
||||
- '#send.* expects int, string#'
|
||||
|
|
|
|||
Loading…
Reference in a new issue