Skip to content

Commit 37f67e1

Browse files
committed
Try fix PHPStan issues
1 parent 419846b commit 37f67e1

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

Filter/FilterScopeFactory.php

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
declare(strict_types=1);
23

34
namespace Loki\Components\Filter;
45

56
use Magento\Framework\ObjectManagerInterface;
67

7-
class FilterScopeFactory
8+
final class FilterScopeFactory
89
{
910
public function __construct(
1011
private ObjectManagerInterface $objectManager,
1112
){
1213
}
1314

14-
/**
15-
* @phpstan-return FilterScope
16-
*/
17-
public function create(): FilterScope
15+
public function create(array $data = []): FilterScope
1816
{
19-
/** @var FilterScope $filterScope */
20-
$filterScope = $this->objectManager->create(FilterScope::class);
21-
return $filterScope;
17+
return $this->objectManager->create(FilterScope::class, $data);
2218
}
2319
}

MODULE.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@
3737
"functional": 0
3838
},
3939
"phpcs_severity": "9",
40-
"phpstan_level": "2"
40+
"phpstan_level": "1"
4141
}

0 commit comments

Comments
 (0)