forked from Dolibarr/dolibarr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Qual: Fix phan notices (hrm)
- Loading branch information
Showing
20 changed files
with
100 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* Copyright (C) 2005-2009 Regis Houssin <[email protected]> | ||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <[email protected]> | ||
* Copyright (C) 2019-2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* Copyright (C) 2024-2025 MDW <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -31,7 +31,7 @@ | |
|
||
|
||
/** | ||
* Class to manage customer Bom numbering rules advanced | ||
* Class to manage customer evaluation numbering rules advanced | ||
*/ | ||
class mod_evaluation_advanced extends ModeleNumRefEvaluation | ||
{ | ||
|
@@ -125,7 +125,7 @@ public function getExample() | |
/** | ||
* Return next free value | ||
* | ||
* @param Evaluation $object Object we need next value for | ||
* @param Evaluation|EvaluationLine|Job|Position|Skill|Skilldet|SkillRank $object Object $object Object we need next value for | ||
* @return string|int<-1,0> Value if OK, <=0 if KO | ||
*/ | ||
public function getNextValue($object) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
/* Copyright (C) 2005-2010 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2005-2009 Regis Houssin <[email protected]> | ||
* Copyright (C) 2024-2025 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* Copyright (C) 2024-2025 MDW <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -122,7 +122,7 @@ public function canBeActivated($object) | |
/** | ||
* Return next free value | ||
* | ||
* @param Evaluation $object Object we need next value for | ||
* @param Evaluation|EvaluationLine|Job|Position|Skill|Skilldet|SkillRank $object Object $object Object we need next value for | ||
* @return string|int<-1,0> Value if OK, <=0 if KO | ||
*/ | ||
public function getNextValue($object) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
* Copyright (C) 2006 Andre Cianfarani <[email protected]> | ||
* Copyright (C) 2012 Juanjo Menent <[email protected]> | ||
* Copyright (C) 2014 Marcos García <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* Copyright (C) 2024-2025 MDW <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -86,7 +86,7 @@ abstract class ModeleNumRefEvaluation extends CommonNumRefGenerator | |
/** | ||
* Return next free value | ||
* | ||
* @param Evaluation $object Object we need next value for | ||
* @param Evaluation|EvaluationLine|Job|Position|Skill|Skilldet|SkillRank $object Object we need next value for | ||
* @return string|int<-1,0> Value if OK, <=0 if KO | ||
*/ | ||
abstract public function getNextValue($object); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?php | ||
/* Copyright (C) 2015 Alexandre Spangaro <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2025 MDW <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -70,7 +71,7 @@ | |
if ($action == 'update') { | ||
$error = 0; | ||
|
||
foreach ($list as $constname) { | ||
foreach ($list as $constname) { // @phan-suppress-current-line PhanEmptyForeach | ||
$constvalue = GETPOST($constname, 'alpha'); | ||
|
||
if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { | ||
|
@@ -117,7 +118,7 @@ | |
print '<td colspan="3">'.$langs->trans('Parameters').'</td>'; | ||
print "</tr>\n"; | ||
|
||
foreach ($list as $key) { | ||
foreach ($list as $key) { // @phan-suppress-current-line PhanEmptyForeach | ||
print '<tr class="oddeven value">'; | ||
|
||
// Param | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
/* Copyright (C) 2015 Alexandre Spangaro <[email protected]> | ||
* Copyright (C) 2018-2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* Copyright (C) 2024-2025 MDW <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -227,7 +227,7 @@ public function create($user) | |
} else { | ||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.'establishment'); | ||
|
||
$sql = 'UPDATE '.MAIN_DB_PREFIX."establishment SET ref = '".$this->db->escape($this->id)."'"; | ||
$sql = 'UPDATE '.MAIN_DB_PREFIX."establishment SET ref = '".$this->db->escape((string) $this->id)."'"; | ||
$sql .= " WHERE rowid = ".((int) $this->id); | ||
$this->db->query($sql); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
* Copyright (C) 2021 Jean-Pascal BOUDET <[email protected]> | ||
* Copyright (C) 2021 Grégory BLEMAND <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* Copyright (C) 2024-2025 MDW <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -1057,7 +1057,7 @@ public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hided | |
* Return clickable link of object (with eventually picto) | ||
* | ||
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) | ||
* @param array{string,mixed} $arraydata Array of data | ||
* @param ?array<string,mixed> $arraydata Array of data | ||
* @return string HTML Code for Kanban thumb. | ||
*/ | ||
public function getKanbanView($option = '', $arraydata = null) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
* Copyright (C) 2021 Jean-Pascal BOUDET <[email protected]> | ||
* Copyright (C) 2021 Grégory BLEMAND <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* Copyright (C) 2024-2025 MDW <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -1046,7 +1046,7 @@ public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hided | |
* Return clickable link of object (with eventually picto) | ||
* | ||
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) | ||
* @param array{string,mixed} $arraydata Array of data | ||
* @param ?array<string,mixed> $arraydata Array of data | ||
* @return string HTML Code for Kanban thumb. | ||
*/ | ||
public function getKanbanView($option = '', $arraydata = null) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
* Copyright (C) 2021 Jean-Pascal BOUDET <[email protected]> | ||
* Copyright (C) 2021 Grégory BLEMAND <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* Copyright (C) 2024-2025 MDW <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -1119,7 +1119,7 @@ public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hided | |
* Return clickable link of object (with eventually picto) | ||
* | ||
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) | ||
* @param array{string,mixed} $arraydata Array of data | ||
* @param ?array<string,mixed> $arraydata Array of data | ||
* @return string HTML Code for Kanban thumb. | ||
*/ | ||
public function getKanbanView($option = '', $arraydata = null) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
* Copyright (C) 2021 Jean-Pascal BOUDET <[email protected]> | ||
* Copyright (C) 2021 Grégory BLEMAND <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* Copyright (C) 2024-2025 MDW <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -1123,7 +1123,7 @@ public static function typeCodeToLabel($code) | |
* Return clickable link of object (with eventually picto) | ||
* | ||
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) | ||
* @param array{string,mixed} $arraydata Array of data | ||
* @param ?array<string,mixed> $arraydata Array of data | ||
* @return string HTML Code for Kanban thumb. | ||
*/ | ||
public function getKanbanView($option = '', $arraydata = null) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
* Copyright (C) 2021 Jean-Pascal BOUDET <[email protected]> | ||
* Copyright (C) 2021 Grégory BLEMAND <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* Copyright (C) 2024-2025 MDW <[email protected]> | ||
* Copyright (C) 2024 Alexandre Spangaro <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
|
@@ -295,7 +295,6 @@ | |
|
||
|
||
/** | ||
* | ||
* Return a html list element with diff between required rank and user rank | ||
* | ||
* @param array<int,stdClass> $TMergedSkills skill list with all rate to add good picto | ||
|
@@ -496,7 +495,7 @@ function displayUsersListWithPicto(&$TUser, $fk_usergroup = 0, $namelist = 'list | |
} | ||
|
||
$out .= '<li fk_user="' . $user->id . '" class="' . $class . '"> | ||
' . $form->showphoto('userphoto', $user, 0, 0, 0, 'photoref', 'small', 1, 0, 1) . ' | ||
' . $form->showphoto('userphoto', $user, 0, 0, 0, 'photoref', 'small', 1, 0, '', 1) . ' | ||
<h3>' . $name . '</h3> | ||
<p>' . $desc . '</p> | ||
</li>'; | ||
|
@@ -510,7 +509,6 @@ function displayUsersListWithPicto(&$TUser, $fk_usergroup = 0, $namelist = 'list | |
|
||
|
||
/** | ||
* | ||
* Allow to get skill(s) of a user | ||
* | ||
* @param int[] $TUser array of employees we need to get skills | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?php | ||
/* Copyright (C) 2015 Alexandre Spangaro <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2025 MDW <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -49,8 +50,8 @@ | |
|
||
// List of status | ||
static $tmpstatus2label = array( | ||
'0'=>'CloseEtablishment', | ||
'1'=>'OpenEtablishment' | ||
'0' => 'CloseEtablishment', | ||
'1' => 'OpenEtablishment' | ||
); | ||
$status2label = array(''); | ||
foreach ($tmpstatus2label as $key => $val) { | ||
|
@@ -242,7 +243,7 @@ | |
print '<tr>'; | ||
print '<td>'.$form->editfieldkey('Country', 'selectcountry_id', '', $object, 0).'</td>'; | ||
print '<td class="maxwidthonsmartphone">'; | ||
print $form->select_country(GETPOSTISSET('country_id') ? GETPOSTINT('country_id') : ($object->country_id ? $object->country_id : $mysoc->country_id), 'country_id'); | ||
print $form->select_country((string) (GETPOSTISSET('country_id') ? GETPOSTINT('country_id') : ($object->country_id ? $object->country_id : $mysoc->country_id)), 'country_id'); | ||
if ($user->admin) { | ||
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); | ||
} | ||
|
@@ -326,7 +327,7 @@ | |
// Country | ||
print '<tr><td>'.$form->editfieldkey('Country', 'selectcountry_id', '', $object, 0).'</td>'; | ||
print '<td class="maxwidthonsmartphone">'; | ||
print $form->select_country($object->country_id, 'country_id'); | ||
print $form->select_country((string) $object->country_id, 'country_id'); | ||
if ($user->admin) { | ||
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); | ||
} | ||
|
Oops, something went wrong.