mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
clean phpstan baseline (#31725)
* clean phpstan baseline * fix and clean phpstan baseline * fix and clean phpstan baseline * fix and clean phpstan baseline * fix and clean phpstan baseline * fix and clean phpstan baseline * fix and clean phpstan baseline * fix and clean phpstan baseline * fix and clean phpstan baseline * fix and clean phpstan baseline * fix and clean phpstan baseline * fix and clean phpstan baseline * fix and clean phpstan baseline * fix and clean phpstan baseline --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
parent
b232bb8d45
commit
5cf3074d28
File diff suppressed because it is too large
Load Diff
|
|
@ -12897,7 +12897,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
|
|||
* @param string $elementType Element type (Value of $object->element or value of $object->element@$object->module). Example:
|
||||
* 'action', 'facture', 'project', 'project_task' or
|
||||
* 'myobject@mymodule' (or old syntax 'mymodule_myobject' like 'project_task')
|
||||
* @return array{module:string,element:string,table_element:string,subelement:string,classpath:string,classfile:string,classname:string,dir_output:string,dir_temp:string} array('module'=>, 'classpath'=>, 'element'=>, 'subelement'=>, 'classfile'=>, 'classname'=>, 'dir_output'=>, 'dir_temp'=>)
|
||||
* @return array{module:string,element:string,table_element:string,subelement:string,classpath:string,classfile:string,classname:string,dir_output:string,dir_temp:string,parent_element:string} array('module'=>, 'classpath'=>, 'element'=>, 'subelement'=>, 'classfile'=>, 'classname'=>, 'dir_output'=>, 'dir_temp'=>)
|
||||
* @see fetchObjectByElement(), getMultidirOutput()
|
||||
*/
|
||||
function getElementProperties($elementType)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2017-2020 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
/* Copyright (C) 2017-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
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* \file core/triggers/interface_99_modZapier_ZapierTriggers.class.php
|
||||
* \file htdocs/core/triggers/interface_99_modZapier_ZapierTriggers.class.php
|
||||
* \ingroup zapier
|
||||
* \brief File for Zappier Triggers.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/* Copyright (C) 2005-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2005-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
|
|
|
|||
|
|
@ -925,7 +925,7 @@ class EcmFiles extends CommonObject
|
|||
$datas['ref'] = '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||
}
|
||||
if (!empty($this->gen_or_uploaded)) {
|
||||
$datas['gen_or_upload'] .= '<br><b>'.$langs->trans('GenOrUpload').':</b> '.$this->gen_or_uploaded;
|
||||
$datas['gen_or_upload'] = '<br><b>'.$langs->trans('GenOrUpload').':</b> '.$this->gen_or_uploaded;
|
||||
}
|
||||
|
||||
return $datas;
|
||||
|
|
@ -996,7 +996,7 @@ class EcmFiles extends CommonObject
|
|||
if (empty($this->filename)) {
|
||||
$result .= ($linkstart.img_object(($notooltip ? '' : $label), 'label', ($notooltip ? '' : 'class="paddingright"')).$linkend);
|
||||
} else {
|
||||
$result .= ($linkstart.img_mime($this->filename, ($notooltip ? '' : $label), ($notooltip ? '' : 'class="paddingright"')).$linkend);
|
||||
$result .= ($linkstart.img_mime($this->filename, ($notooltip ? '' : dol_escape_htmltag($label, 1)), ($notooltip ? '' : ' paddingright')).$linkend);
|
||||
}
|
||||
if ($withpicto != 2) {
|
||||
$result .= ' ';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-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
|
||||
|
|
@ -57,22 +57,22 @@ function printingAdminPrepareHead($mode)
|
|||
$h++;
|
||||
}
|
||||
|
||||
/** TODO This feature seem to be not ready yet.
|
||||
/* TODO This feature seem to be not ready yet.
|
||||
$head[$h][0] = DOL_URL_ROOT."/printing/admin/printing.php?mode=userconf";
|
||||
$head[$h][1] = $langs->trans("UserConf");
|
||||
$head[$h][2] = 'userconf';
|
||||
$h++;
|
||||
*/
|
||||
|
||||
//$object=new stdClass();
|
||||
// $object=new stdClass();
|
||||
|
||||
// Show more tabs from modules
|
||||
// Entries must be declared in modules descriptor with line
|
||||
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||
//complete_head_from_modules($conf,$langs,$object,$head,$h,'printingadmin');
|
||||
// complete_head_from_modules($conf,$langs,$object,$head,$h,'printingadmin');
|
||||
|
||||
//complete_head_from_modules($conf,$langs,$object,$head,$h,'printing','remove');
|
||||
// complete_head_from_modules($conf,$langs,$object,$head,$h,'printing','remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ $form = new Form($db);
|
|||
$formproduct = new FormProduct($db);
|
||||
$product_fourn = new ProductFournisseur($db);
|
||||
$productstatic = new Product($db);
|
||||
|
||||
$resql = false;
|
||||
// action recherche des produits par mot-cle et/ou par categorie
|
||||
if ($action == 'search') {
|
||||
$current_lang = $langs->getDefaultLang();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2014 Maxime Kohlhaas <support@atm-consulting.fr>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
/* Copyright (C) 2014 Maxime Kohlhaas <support@atm-consulting.fr>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* 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
|
||||
|
|
@ -25,6 +26,15 @@
|
|||
* $cols
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var CommonObject $object
|
||||
* @var Conf $conf
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $conf
|
||||
*
|
||||
* @var string $action
|
||||
* @var array<string,mixed> $parameters
|
||||
*/
|
||||
// Protection to avoid direct call of template
|
||||
if (empty($conf) || !is_object($conf)) {
|
||||
print "Error, template page can't be called as URL";
|
||||
|
|
|
|||
|
|
@ -20,6 +20,16 @@
|
|||
* $backtopage
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var Product|MouvementStock $object
|
||||
* @var FormProduct $formproduct
|
||||
* @var FormProjets $formproject
|
||||
* @var Translate $langs
|
||||
*
|
||||
* @var string $backtopage
|
||||
*/
|
||||
// Protection to avoid direct call of template
|
||||
if (empty($conf) || !is_object($conf)) {
|
||||
print "Error, template page can't be called as URL";
|
||||
|
|
@ -37,12 +47,10 @@ if (empty($conf) || !is_object($conf)) {
|
|||
|
||||
<!-- BEGIN PHP TEMPLATE STOCKCORRECTION.TPL.PHP -->
|
||||
<?php
|
||||
/**
|
||||
* @var Product $object
|
||||
*/
|
||||
|
||||
$productref = '';
|
||||
if ($object->element == 'product') {
|
||||
/** @var Product $object */
|
||||
$productref = $object->ref;
|
||||
}
|
||||
|
||||
|
|
@ -152,6 +160,7 @@ print '<table class="border centpercent">';
|
|||
// Warehouse or product
|
||||
print '<tr>';
|
||||
if ($object->element == 'product') {
|
||||
/** @var Product $object */
|
||||
print '<td class="fieldrequired">'.$langs->trans("Warehouse").'</td>';
|
||||
print '<td>';
|
||||
$ident = (GETPOST("dwid") ? GETPOSTINT("dwid") : (GETPOST('id_entrepot') ? GETPOSTINT('id_entrepot') : ($object->element == 'product' && $object->fk_default_warehouse ? $object->fk_default_warehouse : 'ifone')));
|
||||
|
|
@ -162,6 +171,7 @@ if ($object->element == 'product') {
|
|||
print '</td>';
|
||||
}
|
||||
if ($object->element == 'stockmouvement') {
|
||||
/** @var MouvementStock $object */
|
||||
print '<td class="fieldrequired">'.$langs->trans("Product").'</td>';
|
||||
print '<td>';
|
||||
print img_picto('', 'product');
|
||||
|
|
@ -171,6 +181,7 @@ if ($object->element == 'stockmouvement') {
|
|||
print '<td class="fieldrequired">'.$langs->trans("NumberOfUnit").'</td>';
|
||||
print '<td>';
|
||||
if ($object->element == 'product' || $object->element == 'stockmouvement') {
|
||||
/** @var Product|MouvementStock $object */
|
||||
print '<select name="mouvement" id="mouvement" class="minwidth100 valignmiddle">';
|
||||
print '<option value="0">'.$langs->trans("Add").'</option>';
|
||||
print '<option value="1"'.(GETPOST('mouvement') ? ' selected="selected"' : '').'>'.$langs->trans("Delete").'</option>';
|
||||
|
|
@ -183,6 +194,7 @@ print '</tr>';
|
|||
|
||||
// If product is a Kit, we ask if we must disable stock change of subproducts
|
||||
if (getDolGlobalString('PRODUIT_SOUSPRODUITS') && $object->element == 'product' && $object->hasFatherOrChild(1)) {
|
||||
/** @var Product $object */
|
||||
print '<tr>';
|
||||
print '<td></td>';
|
||||
print '<td colspan="3">';
|
||||
|
|
@ -197,6 +209,7 @@ if (isModEnabled('productbatch') &&
|
|||
(($object->element == 'product' && $object->hasbatch())
|
||||
|| ($object->element == 'stockmouvement'))
|
||||
) {
|
||||
/** @var Product|MouvementStock $object */
|
||||
print '<tr>';
|
||||
print '<td'.($object->element == 'stockmouvement' ? '' : ' class="fieldrequired"').'>'.$langs->trans("batch_number").'</td><td colspan="3">';
|
||||
if ($pdluoid > 0) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2010-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-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
|
||||
|
|
@ -20,6 +20,16 @@
|
|||
* $backtopage
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var Product|MouvementStock $object
|
||||
* @var FormProduct $formproduct
|
||||
* @var Translate $langs
|
||||
*
|
||||
* @var string $backtopage
|
||||
*/
|
||||
|
||||
// Protection to avoid direct call of template
|
||||
if (empty($conf) || !is_object($conf)) {
|
||||
print "Error, template page can't be called as URL";
|
||||
|
|
@ -38,6 +48,7 @@ if (empty($conf) || !is_object($conf)) {
|
|||
<?php
|
||||
$productref = '';
|
||||
if ($object->element == 'product') {
|
||||
/** @var Product $object */
|
||||
$productref = $object->ref;
|
||||
}
|
||||
|
||||
|
|
@ -77,6 +88,7 @@ print '<table class="border centpercent">';
|
|||
// Source warehouse or product
|
||||
print '<tr>';
|
||||
if ($object->element == 'product') {
|
||||
/** @var Product $object */
|
||||
print '<td class="fieldrequired">'.$langs->trans("WarehouseSource").'</td>';
|
||||
print '<td>';
|
||||
print img_picto('', 'stock');
|
||||
|
|
@ -86,6 +98,7 @@ if ($object->element == 'product') {
|
|||
print '</td>';
|
||||
}
|
||||
if ($object->element == 'stockmouvement') {
|
||||
/** @var MouvementStock $object */
|
||||
print '<td class="fieldrequired">'.$langs->trans("Product").'</td>';
|
||||
print '<td>';
|
||||
print img_picto('', 'product');
|
||||
|
|
@ -104,6 +117,7 @@ if (isModEnabled('productbatch') &&
|
|||
(($object->element == 'product' && $object->hasbatch())
|
||||
|| ($object->element == 'stockmouvement'))
|
||||
) {
|
||||
/** @var Product|MouvementStock $object */
|
||||
print '<tr>';
|
||||
print '<td'.($object->element == 'stockmouvement' ? '' : ' class="fieldrequired"').'>'.$langs->trans("batch_number").'</td><td colspan="3">';
|
||||
if ($pdluoid > 0) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2010-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* 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
|
||||
|
|
@ -20,7 +21,10 @@
|
|||
* \ingroup projet
|
||||
* \brief Gantt diagram of a project
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var DoliDB $db
|
||||
* @var Translate $langs
|
||||
*/
|
||||
?>
|
||||
|
||||
<div id="principal_content" style="margin-left: 0;">
|
||||
|
|
|
|||
|
|
@ -84,12 +84,12 @@ $contactstatic = new Contact($db);
|
|||
$task = new Task($db);
|
||||
|
||||
$arrayofcss = array('/includes/jsgantt/jsgantt.css');
|
||||
|
||||
$arrayofjs = [];
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
$arrayofjs = array(
|
||||
'/includes/jsgantt/jsgantt.js',
|
||||
'/projet/jsgantt_language.js.php?lang='.$langs->defaultlang
|
||||
);
|
||||
$arrayofjs = [
|
||||
'/includes/jsgantt/jsgantt.js',
|
||||
'/projet/jsgantt_language.js.php?lang='.$langs->defaultlang
|
||||
];
|
||||
}
|
||||
|
||||
//$title=$langs->trans("Gantt").($object->ref?' - '.$object->ref.' '.$object->name:'');
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2013-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* 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
|
||||
|
|
@ -17,6 +18,17 @@
|
|||
*/
|
||||
|
||||
// variable $listofopplabel and $listofoppstatus should be defined
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var Form $form
|
||||
* @var DoliDB $db
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*
|
||||
* @var string $projectsListId
|
||||
* @var int $socid
|
||||
* @var string[] $listofoppstatus
|
||||
*/
|
||||
|
||||
if (getDolGlobalString('PROJECT_USE_OPPORTUNITIES')) {
|
||||
$sql = "SELECT p.fk_opp_status as opp_status, cls.code, COUNT(p.rowid) as nb, SUM(p.opp_amount) as opp_amount, SUM(p.opp_amount * p.opp_percent) as ponderated_opp_amount";
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user