Skip to content

Commit 4334797

Browse files
frederic34eldy
andauthored
clean code (#36179)
* clean code * clean code * fix * fix * fix * fix * fix --------- Co-authored-by: Laurent Destailleur <[email protected]>
1 parent 0831c65 commit 4334797

File tree

3 files changed

+9
-40
lines changed

3 files changed

+9
-40
lines changed

dev/build/phpstan/phpstan-baseline.neon

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4272,30 +4272,6 @@ parameters:
42724272
count: 2
42734273
path: ../../../htdocs/core/actions_dellink.inc.php
42744274

4275-
-
4276-
message: '#^Variable \$hidedesc might not be defined\.$#'
4277-
identifier: variable.undefined
4278-
count: 2
4279-
path: ../../../htdocs/core/actions_lineupdown.inc.php
4280-
4281-
-
4282-
message: '#^Variable \$hidedetails might not be defined\.$#'
4283-
identifier: variable.undefined
4284-
count: 2
4285-
path: ../../../htdocs/core/actions_lineupdown.inc.php
4286-
4287-
-
4288-
message: '#^Variable \$hideref might not be defined\.$#'
4289-
identifier: variable.undefined
4290-
count: 2
4291-
path: ../../../htdocs/core/actions_lineupdown.inc.php
4292-
4293-
-
4294-
message: '#^Variable \$permissiontoedit might not be defined\.$#'
4295-
identifier: variable.undefined
4296-
count: 2
4297-
path: ../../../htdocs/core/actions_lineupdown.inc.php
4298-
42994275
-
43004276
message: '#^Call to function is_object\(\) with object will always evaluate to true\.$#'
43014277
identifier: function.alreadyNarrowedType
@@ -4344,12 +4320,6 @@ parameters:
43444320
count: 1
43454321
path: ../../../htdocs/core/actions_massactions.inc.php
43464322

4347-
-
4348-
message: '#^Variable \$from might not be defined\.$#'
4349-
identifier: variable.undefined
4350-
count: 5
4351-
path: ../../../htdocs/core/actions_massactions.inc.php
4352-
43534323
-
43544324
message: '#^Variable \$listofobjectthirdparties in empty\(\) always exists and is not falsy\.$#'
43554325
identifier: empty.variable
@@ -12870,12 +12840,6 @@ parameters:
1287012840
count: 1
1287112841
path: ../../../htdocs/projet/comment.php
1287212842

12873-
-
12874-
message: '#^Call to function method_exists\(\) with Project and ''fetchComments'' will always evaluate to true\.$#'
12875-
identifier: function.alreadyNarrowedType
12876-
count: 1
12877-
path: ../../../htdocs/projet/contact.php
12878-
1287912843
-
1288012844
message: '#^Call to function method_exists\(\) with Project and ''fetchComments'' will always evaluate to true\.$#'
1288112845
identifier: function.alreadyNarrowedType

htdocs/core/actions_lineupdown.inc.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@
3939
* @var Translate $langs
4040
*
4141
* @var string $action
42+
* @var int $permissiontoedit
43+
* @var int<0,1> $hidedetails
44+
* @var int<0,1> $hidedesc
45+
* @var int<0,1> $hideref
4246
*/
4347
if ($action == 'up' && $permissiontoedit) {
4448
$object->line_up(GETPOSTINT('rowid'));

htdocs/core/actions_massactions.inc.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,7 @@
480480
// Send email if there is at least one qualified object for current thirdparty
481481
if (count($listofqualifiedobj) > 0) {
482482
$langs->load("commercial");
483+
$from = '';
483484

484485
$reg = array();
485486
$fromtype = GETPOST('fromtype');
@@ -685,11 +686,11 @@
685686
// Initialisation donnees
686687
$objectobj2->sendtoid = (empty($contactidtosend) ? 0 : $contactidtosend);
687688
$objectobj2->actionmsg = $actionmsg; // Long text
688-
$objectobj2->actionmsg2 = $actionmsg2; // Short text
689-
$objectobj2->fk_element = $objid2;
690-
$objectobj2->elementtype = $objectobj2->element;
689+
$objectobj2->actionmsg2 = $actionmsg2; // Short text
690+
$objectobj2->fk_element = $objid2;
691+
$objectobj2->elementtype = $objectobj2->element;
691692
if (getDolGlobalString('MAIN_MAIL_REPLACE_EVENT_TITLE_BY_EMAIL_SUBJECT')) {
692-
$objectobj2->actionmsg2 = $subjectreplaced; // Short text
693+
$objectobj2->actionmsg2 = $subjectreplaced; // Short text
693694
}
694695

695696
$triggername = strtoupper(get_class($objectobj2)).'_SENTBYMAIL';

0 commit comments

Comments
 (0)