Skip to content

Commit 0512c26

Browse files
committed
Fix static test failure
1 parent 7b95f8f commit 0512c26

File tree

1 file changed

+9
-0
lines changed
  • app/code/Magento/Catalog/Test/Unit/Block/Adminhtml/Category/Checkboxes

1 file changed

+9
-0
lines changed

app/code/Magento/Catalog/Test/Unit/Block/Adminhtml/Category/Checkboxes/TreeTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ protected function setUp(): void
4343
private function createCategoryCollectionStub(array $paths)
4444
{
4545
// Simple iterable stub with chainable methods
46+
/**
47+
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
48+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
49+
*/
4650
return new class($paths) implements \IteratorAggregate, \Countable {
4751
/** @var array */
4852
private $items;
@@ -73,6 +77,7 @@ public function addAttributeToSelect($arg)
7377
}
7478
/**
7579
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
80+
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
7681
*/
7782
public function addAttributeToFilter($field, $cond)
7883
{
@@ -179,6 +184,10 @@ public function testSetCategoryIdsWithScalarCastsToIntArrayAndFiltersCollection(
179184
$block = $this->buildBlockMock();
180185

181186
// Custom stub that captures the last filter applied
187+
/**
188+
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
189+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
190+
*/
182191
$collectionStub = new class() implements \IteratorAggregate, \Countable {
183192
/** @var array */
184193
private $items = [];

0 commit comments

Comments
 (0)