add fix phpstan

This commit is contained in:
Frédéric France 2024-12-31 16:25:57 +01:00
parent 14f11c2868
commit ee9a5291cd
No known key found for this signature in database
GPG Key ID: CE25B0B7B53B9177
10 changed files with 17 additions and 15 deletions

View File

@ -101,7 +101,7 @@ $documentation->showSidebar(); ?>
$label = 'My action label used for accessibility visually for impaired people';
$user_right = 1;
$html = '<span class="fa fa-comments paddingright"></span>'.$langs->trans('DocSetEventMessageDisplayMessages');;
$html = '<span class="fa fa-comments paddingright"></span>'.$langs->trans('DocSetEventMessageDisplayMessages');
$action_type = 'displayeventmessages';
$url = $_SERVER["PHP_SELF"].'?action=displayeventmessages';
print dolGetButtonAction($label, $html, $action_type, $url, '', $user_right); ?>
@ -138,7 +138,7 @@ $documentation->showSidebar(); ?>
<?php
$label = 'My action label used for accessibility visually for impaired people';
$user_right = 1;
$html = '<span class="fa fa-comment paddingright"></span>'.$langs->trans('DocSetEventMessageDisplayOKMessage');;
$html = '<span class="fa fa-comment paddingright"></span>'.$langs->trans('DocSetEventMessageDisplayOKMessage');
$action_type = 'displayeventmessageok';
$url = $_SERVER["PHP_SELF"].'?action=displayeventmessageok#seteventmessagesection-contextvariations';
$params['attr']['style'] = 'background: #446548';
@ -146,7 +146,7 @@ $documentation->showSidebar(); ?>
$label = 'My action label used for accessibility visually for impaired people';
$user_right = 1;
$html = '<span class="fa fa-comment paddingright"></span>'.$langs->trans('DocSetEventMessageDisplayWarningMessage');;
$html = '<span class="fa fa-comment paddingright"></span>'.$langs->trans('DocSetEventMessageDisplayWarningMessage');
$action_type = 'displayeventmessagewarning';
$url = $_SERVER["PHP_SELF"].'?action=displayeventmessagewarning#seteventmessagesection-contextvariations';
$params['attr']['style'] = 'background: #a28918';
@ -154,7 +154,7 @@ $documentation->showSidebar(); ?>
$label = 'My action label used for accessibility visually for impaired people';
$user_right = 1;
$html = '<span class="fa fa-comment paddingright"></span>'.$langs->trans('DocSetEventMessageDisplayErrorMessage');;
$html = '<span class="fa fa-comment paddingright"></span>'.$langs->trans('DocSetEventMessageDisplayErrorMessage');
$action_type = 'displayeventmessageerror';
$url = $_SERVER["PHP_SELF"].'?action=displayeventmessageerror#seteventmessagesection-contextvariations';
$params['attr']['style'] = 'background: #a72947';

View File

@ -571,7 +571,7 @@ class FactureRec extends CommonInvoice
$sql .= " localtax2 = ".((float) $this->total_localtax2).",";
$sql .= " total_ht = ".((float) $this->total_ht).",";
$sql .= " total_ttc = ".((float) $this->total_ttc).",";
$sql .= " fk_societe_rib = ".(!empty($this->fk_societe_rib) ? ((int) $this->fk_societe_rib) : 'NULL');;
$sql .= " fk_societe_rib = ".(!empty($this->fk_societe_rib) ? ((int) $this->fk_societe_rib) : 'NULL');
// TODO Add missing fields
$sql .= " WHERE rowid = ".((int) $this->id);

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018-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
@ -528,7 +528,7 @@ class Contracts extends DolibarrApi
}
if ($field == 'array_options' && is_array($value)) {
foreach ($value as $index => $val) {
$this->contract->array_options[$index] = $this->_checkValForAPI($field, $val, $this->contract);;
$this->contract->array_options[$index] = $this->_checkValForAPI($field, $val, $this->contract);
}
continue;
}

View File

@ -796,7 +796,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$drawTabHideTop = $hidetop;
$drawTabTop = $tab_top_newpage;
$drawTabBottom = $this->page_hauteur - $heightforfooter;;
$drawTabBottom = $this->page_hauteur - $heightforfooter;
$hideBottom = 0; // TODO understand why it change to 1 or 0 during process
if ($i == $pageposbeforeprintlines) {

View File

@ -986,7 +986,7 @@ class pdf_sponge extends ModelePDFFactures
$drawTabHideTop = $hidetop;
$drawTabTop = $this->tab_top_newpage;
$drawTabBottom = $this->page_hauteur - $this->heightforfooter;;
$drawTabBottom = $this->page_hauteur - $this->heightforfooter;
$hideBottom = 0; // TODO understand why it change to 1 or 0 during process
if ($i == $pageposbeforeprintlines) {

View File

@ -822,7 +822,7 @@ class pdf_cyan extends ModelePDFPropales
$drawTabHideTop = $hidetop;
$drawTabTop = $tab_top_newpage;
$drawTabBottom = $this->page_hauteur - $heightforfooter;;
$drawTabBottom = $this->page_hauteur - $heightforfooter;
$hideBottom = 0; // TODO understand why it change to 1 or 0 during process
if ($i == $pageposbeforeprintlines) {

View File

@ -961,7 +961,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$colspan="3";
if (isModEnabled('stock')) {
$colspan++;;
$colspan++;
}
if (isModEnabled('productbatch')) {
$colspan++;

View File

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2016 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
@ -464,7 +465,7 @@ class Tasks extends DolibarrApi
}
if ($field == 'array_options' && is_array($value)) {
foreach ($value as $index => $val) {
$this->task->array_options[$index] = $this->_checkValForAPI($field, $val, $this->task);;
$this->task->array_options[$index] = $this->_checkValForAPI($field, $val, $this->task);
}
continue;
}

View File

@ -469,7 +469,7 @@ if ($action == "update_extras" && $permissiontoadd) {
$triggermodname = 'SALARY_MODIFY';
$result = $object->insertExtraFields(empty($triggermodname) ? '' : $triggermodname, $user);
$result = $object->insertExtraFields($triggermodname, $user);
if ($result > 0) {
setEventMessages($langs->trans('RecordSaved'), null, 'mesgs');
$action = 'view';

View File

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*/
if (!defined('ISLOADEDBYSTEELSHEET')) {
die('Must be call by steelsheet');
@ -235,8 +236,8 @@ a.info-box-text-a i.fa.fa-exclamation-triangle {
float: left;
text-align: center;
font-size: 45px;
line-height: 94px;; /* must be same height as min-height of .info-box */
height: 94px;; /* must be same height as min-height of .info-box */
line-height: 94px; /* must be same height as min-height of .info-box */
height: 94px; /* must be same height as min-height of .info-box */
width: 86px;
background: var(--colorbacktitle1) !important;
<?php if (isset($conf->global->THEME_SATURATE_RATIO)) { ?>