Skip to content

Commit 784cc12

Browse files
committed
fix static test failure issue
1 parent debe1e6 commit 784cc12

File tree

1 file changed

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

1 file changed

+7
-7
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
declare(strict_types=1);
23
/**
34
* Copyright 2025 Adobe
45
* All Rights Reserved.
@@ -52,9 +53,9 @@ public function __construct(array $paths)
5253
$items[] = new class($path) {
5354
/** @var string */
5455
private $path;
55-
public function __construct($p)
56+
public function __construct(string $path)
5657
{
57-
$this->path = $p;
58+
$this->path = $path;
5859
}
5960
public function getPath()
6061
{
@@ -68,6 +69,9 @@ public function addAttributeToSelect($arg)
6869
{
6970
return $this;
7071
}
72+
/**
73+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
74+
*/
7175
public function addAttributeToFilter($field, $cond)
7276
{
7377
return $this;
@@ -172,15 +176,11 @@ public function testSetCategoryIdsWithScalarCastsToIntArrayAndFiltersCollection(
172176
$block = $this->buildBlockMock();
173177

174178
// Custom stub that captures the last filter applied
175-
$collectionStub = new class([]) implements \IteratorAggregate, \Countable {
179+
$collectionStub = new class() implements \IteratorAggregate, \Countable {
176180
/** @var array */
177181
private $items = [];
178182
/** @var array|null */
179183
public $lastFilter;
180-
public function __construct($paths)
181-
{
182-
$this->items = [];
183-
}
184184
public function addAttributeToSelect($arg)
185185
{
186186
return $this;

0 commit comments

Comments
 (0)