Skip to content

Commit

Permalink
clean baseline
Browse files Browse the repository at this point in the history
Debug v21

NEW: use Expedition::$date_shipping property in card and list (Dolibarr#31701)

* NEW: use Expedition::$date_shipping property in card and list

* FIX: translation

* FIX: PHPStan rebutal

* FIX: not a great idea to copy and not edit comment

* FIX: on create, expected delivery date should precede sending date

* Update card.php

* Update list.php

* Update list.php

* Update list.php

---------

Co-authored-by: Laurent Destailleur <[email protected]>

clean baseline

clean baseline

clean baseline
  • Loading branch information
frederic34 committed Nov 14, 2024
1 parent 6acfed1 commit b891c7d
Show file tree
Hide file tree
Showing 13 changed files with 206 additions and 111 deletions.
50 changes: 1 addition & 49 deletions build/phpstan/phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -3921,7 +3921,7 @@ parameters:
-
message: '#^If condition is always true\.$#'
identifier: if.alwaysTrue
count: 9
count: 3
path: ../../htdocs/categories/viewcat.php

-
Expand Down Expand Up @@ -4608,12 +4608,6 @@ parameters:
count: 1
path: ../../htdocs/comm/propal/card.php

-
message: '#^Parameter \#4 \$url of function dolGetButtonAction expects array\<int, array\{lang\: string, enabled\: bool, perm\: bool, label\: string, url\: string, urlroot\?\: string, isDropDown\?\: int\<0, 1\>\}\>\|string, array\{0\: array\{lang\: ''orders'', enabled\: bool, perm\: 0\|1, label\: ''AddOrder'', url\: non\-falsy\-string\}, 1\: array\{lang\: ''interventions'', enabled\: bool, perm\: 0\|1, label\: ''AddIntervention'', url\: non\-falsy\-string\}\|array\{lang\: ''orders'', enabled\: bool, perm\: bool, label\: ''AddPurchaseOrder'', url\: non\-falsy\-string\}, 2\: array\{lang\: ''contracts'', enabled\: bool, perm\: 0\|1, label\: ''AddContract'', url\: non\-falsy\-string\}\|array\{lang\: ''interventions'', enabled\: bool, perm\: 0\|1, label\: ''AddIntervention'', url\: non\-falsy\-string\}, 3\?\: array\{lang\: ''contracts'', enabled\: bool, perm\: 0\|1, label\: ''AddContract'', url\: non\-falsy\-string\}\|array\{lang\: ''invoice'', enabled\: bool, perm\: 0\|1, label\: ''CreateBill'', url\: non\-falsy\-string\}, 4\?\: array\{lang\: ''invoice'', enabled\: bool, perm\: 0\|1, label\: ''CreateBill'', url\: non\-falsy\-string\}\} given\.$#'
identifier: argument.type
count: 2
path: ../../htdocs/comm/propal/card.php

-
message: '#^Property CommonObject\:\:\$fk_project \(int\) in isset\(\) is not nullable\.$#'
identifier: isset.property
Expand Down Expand Up @@ -5028,12 +5022,6 @@ parameters:
count: 1
path: ../../htdocs/commande/card.php

-
message: '#^Parameter \#4 \$url of function dolGetButtonAction expects array\<int, array\{lang\: string, enabled\: bool, perm\: bool, label\: string, url\: string, urlroot\?\: string, isDropDown\?\: int\<0, 1\>\}\>\|string, array\{0\: array\{lang\: ''interventions'', enabled\: bool, perm\: 0\|1, label\: ''AddIntervention'', url\: non\-falsy\-string\}, 1\: array\{lang\: ''contracts'', enabled\: bool, perm\: 0\|1, label\: ''AddContract'', url\: non\-falsy\-string\}, 2\: array\{lang\: ''bills'', enabled\: bool, perm\: bool, label\: ''CreateBill'', url\: non\-falsy\-string\}\|array\{lang\: ''sendings'', enabled\: bool, perm\: 0\|1, label\: ''CreateShipment'', url\: non\-falsy\-string\}, 3\?\: array\{lang\: ''bills'', enabled\: bool, perm\: bool, label\: ''CreateBill'', url\: non\-falsy\-string\}\}\|array\{0\: array\{lang\: ''orders'', enabled\: bool, perm\: bool, label\: ''AddPurchaseOrder'', url\: non\-falsy\-string\}, 1\: array\{lang\: ''interventions'', enabled\: bool, perm\: 0\|1, label\: ''AddIntervention'', url\: non\-falsy\-string\}, 2\: array\{lang\: ''contracts'', enabled\: bool, perm\: 0\|1, label\: ''AddContract'', url\: non\-falsy\-string\}, 3\: array\{lang\: ''bills'', enabled\: bool, perm\: bool, label\: ''CreateBill'', url\: non\-falsy\-string\}\|array\{lang\: ''sendings'', enabled\: bool, perm\: 0\|1, label\: ''CreateShipment'', url\: non\-falsy\-string\}, 4\?\: array\{lang\: ''bills'', enabled\: bool, perm\: bool, label\: ''CreateBill'', url\: non\-falsy\-string\}\} given\.$#'
identifier: argument.type
count: 2
path: ../../htdocs/commande/card.php

-
message: '#^Result of && is always false\.$#'
identifier: booleanAnd.alwaysFalse
Expand Down Expand Up @@ -31884,30 +31872,6 @@ parameters:
count: 1
path: ../../htdocs/public/test/test_arrays.php

-
message: '#^Variable \$conf might not be defined\.$#'
identifier: variable.undefined
count: 3
path: ../../htdocs/public/test/test_badges.php

-
message: '#^Variable \$dolibarr_main_prod might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../htdocs/public/test/test_badges.php

-
message: '#^Parameter \#7 \$params of function dolGetButtonAction expects array\{confirm\?\: array\{url\?\: string, title\?\: string, content\?\: string, action\-btn\-label\?\: string, cancel\-btn\-label\?\: string, modal\?\: bool\}, attr\?\: array\<string, mixed\>, areDropdownButtons\?\: bool, backtopage\?\: string, lang\?\: string, enabled\?\: bool, perm\?\: int\<0, 1\>, label\?\: string, \.\.\.\}, array\{confirm\: true\} given\.$#'
identifier: argument.type
count: 2
path: ../../htdocs/public/test/test_buttons.php

-
message: '#^Variable \$dolibarr_main_prod might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../htdocs/public/test/test_buttons.php

-
message: '#^Variable \$dolibarr_main_prod might not be defined\.$#'
identifier: variable.undefined
Expand All @@ -31920,18 +31884,6 @@ parameters:
count: 1
path: ../../htdocs/public/test/test_exec.php

-
message: '#^Variable \$db might not be defined\.$#'
identifier: variable.undefined
count: 2
path: ../../htdocs/public/test/test_forms.php

-
message: '#^Variable \$dolibarr_main_prod might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../htdocs/public/test/test_forms.php

-
message: '#^Variable \$dolibarr_main_prod might not be defined\.$#'
identifier: variable.undefined
Expand Down
12 changes: 6 additions & 6 deletions htdocs/categories/viewcat.php
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,7 @@
if ($type == Categorie::TYPE_CUSTOMER) {
if ($user->hasRight("societe", "read")) {
$permission = $user->hasRight('societe', 'creer');
$showclassifyform = $user->hasRight('societe', 'creer');

$socs = $object->getObjectsInCateg($type, 0, $limit, $offset);
if ($socs < 0) {
Expand All @@ -624,7 +625,6 @@
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("Customers"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'companies', 0, $newcardbutton, '', $limit);

$showclassifyform = 1;
if ($showclassifyform) {
print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><td>';
Expand Down Expand Up @@ -679,6 +679,7 @@
if ($type == Categorie::TYPE_SUPPLIER) {
if ($user->hasRight("fournisseur", "read")) {
$permission = $user->hasRight('societe', 'creer');
$showclassifyform = $user->hasRight('societe', 'creer');

$socs = $object->getObjectsInCateg($type, 0, $limit, $offset);

Expand All @@ -705,7 +706,6 @@
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("Suppliers"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'companies', 0, $newcardbutton, '', $limit);

$showclassifyform = 1;
if ($showclassifyform) {
print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><td>';
Expand Down Expand Up @@ -763,6 +763,7 @@
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';

$permission = $user->hasRight('adherent', 'creer');
$showclassifyform = $user->hasRight('adherent', 'creer');

$members = $object->getObjectsInCateg($type, 0, $limit, $offset);
if ($members < 0) {
Expand All @@ -788,7 +789,6 @@
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("Member"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'members', 0, $newcardbutton, '', $limit);

$showclassifyform = 1;
if ($showclassifyform) {
print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><td>';
Expand Down Expand Up @@ -1015,8 +1015,8 @@
if ($user->hasRight("project", "read")) {
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';

$permission = ($user->hasRight('projet', 'creer') == 1);
$showclassifyform = ($user->hasRight('projet', 'creer') == 1);
$permission = $user->hasRight('projet', 'creer');
$showclassifyform = $user->hasRight('projet', 'creer');

$objects = $object->getObjectsInCateg($type, 0, $limit, $offset);
if ($objects < 0) {
Expand Down Expand Up @@ -1246,6 +1246,7 @@
if ($type == Categorie::TYPE_TICKET) {
if ($user->hasRight("ticket", "read")) {
$permission = $user->hasRight('categorie', 'creer');
$showclassifyform = $user->hasRight('categorie', 'creer');

$tickets = $object->getObjectsInCateg($type, 0, $limit, $offset);
if ($tickets < 0) {
Expand All @@ -1271,7 +1272,6 @@
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("Ticket"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'ticket', 0, $newcardbutton, '', $limit);

$showclassifyform = 1;
if ($showclassifyform) {
print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><td>';
Expand Down
Loading

0 comments on commit b891c7d

Please sign in to comment.