Skip to content

Commit 360b6f5

Browse files
authored
Cleanup: update addHandle() docblock (#4460)
* Cleanup: update docblock * fixed workflow * phpstan * fixes
1 parent 4e27111 commit 360b6f5

File tree

4 files changed

+6
-24
lines changed

4 files changed

+6
-24
lines changed

.phpstan.dist.baseline.neon

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -558,12 +558,6 @@ parameters:
558558
count: 1
559559
path: app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php
560560

561-
-
562-
message: '#^Parameter \#1 \$ids of method Mage_Adminhtml_Controller_Action\:\:loadLayout\(\) expects bool\|string\|null, array\<int, string\> given\.$#'
563-
identifier: argument.type
564-
count: 2
565-
path: app/code/core/Mage/Adminhtml/Controller/Action.php
566-
567561
-
568562
message: '#^Return type \(Mage_Admin_Model_Session\) of method Mage_Adminhtml_Controller_Report_Abstract\:\:_getSession\(\) should be compatible with return type \(Mage_Adminhtml_Model_Session\) of method Mage_Adminhtml_Controller_Action\:\:_getSession\(\)$#'
569563
identifier: method.childReturnType
@@ -678,12 +672,6 @@ parameters:
678672
count: 1
679673
path: app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php
680674

681-
-
682-
message: '#^Parameter \#1 \$ids of method Mage_Adminhtml_Controller_Action\:\:loadLayout\(\) expects bool\|string\|null, array\<int, string\> given\.$#'
683-
identifier: argument.type
684-
count: 2
685-
path: app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php
686-
687675
-
688676
message: '#^Method Mage_Adminhtml_Controller_Action\:\:_setForcedFormKeyActions\(\) invoked with 2 parameters, 1 required\.$#'
689677
identifier: arguments.count
@@ -2892,12 +2880,6 @@ parameters:
28922880
count: 1
28932881
path: app/code/core/Mage/Core/Controller/Varien/Action.php
28942882

2895-
-
2896-
message: '#^Parameter \#1 \$handles of method Mage_Core_Controller_Varien_Action\:\:loadLayout\(\) expects bool\|string\|null, array\<int, string\> given\.$#'
2897-
identifier: argument.type
2898-
count: 2
2899-
path: app/code/core/Mage/Core/Controller/Varien/Action.php
2900-
29012883
-
29022884
message: '#^Parameter \#2 \$value of method Zend_Controller_Response_Abstract\:\:setHeader\(\) expects string, int\|false given\.$#'
29032885
identifier: argument.type

.rector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
CodeQuality\BooleanNot\SimplifyDeMorganBinaryRector::class,
2323
CodeQuality\If_\SimplifyIfReturnBoolRector::class,
2424
__DIR__ . '/shell/translations.php',
25-
__DIR__ . '/shell/update-copyright.php.php'
25+
__DIR__ . '/shell/update-copyright.php.php',
2626
])
2727
->withRules([
2828
CodeQuality\BooleanNot\ReplaceMultipleBooleanNotRector::class,
@@ -59,4 +59,4 @@
5959
false,
6060
false,
6161
true,
62-
);
62+
);

app/code/core/Mage/Core/Controller/Varien/Action.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ public function getLayout()
225225
/**
226226
* Load layout by handles(s)
227227
*
228-
* @param string|null|bool $handles
228+
* @param array|string|null|bool $handles
229229
* @param bool $generateBlocks
230230
* @param bool $generateXml
231231
* @return $this

app/code/core/Mage/Core/Model/Layout/Update.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,14 @@ public function resetHandles()
142142
}
143143

144144
/**
145-
* @param string $handle
145+
* @param array|string $handle
146146
* @return $this
147147
*/
148148
public function addHandle($handle)
149149
{
150150
if (is_array($handle)) {
151-
foreach ($handle as $h) {
152-
$this->_handles[$h] = 1;
151+
foreach ($handle as $item) {
152+
$this->_handles[$item] = 1;
153153
}
154154
} else {
155155
$this->_handles[$handle] = 1;

0 commit comments

Comments
 (0)