Skip to content

Commit cc5843c

Browse files
committed
Fixed final php code style warning
The solution is a bit worse than the original hack, but php-cs-fixer now reports the original solution as error. Therefore, to avoid the 'unused parameter' warning by the constructor, we now save it in a private variable shortly.
1 parent 6ad4e7c commit cc5843c

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/Resource/ArraySystemProperties.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,21 @@
1313

1414
class ArraySystemProperties implements SystemPropertiesInterface
1515
{
16+
/**
17+
* Data supplied to the constructor. We need to save this shortly to avoid
18+
* code warnings.
19+
*/
20+
private $data;
21+
1622
/**
1723
* {@inheritdoc}
1824
*/
1925
public function __construct(array $data)
2026
{
21-
// Little "hack" to trick PHPStan
22-
// Not the cleanest thing, but it works.
23-
$data;
27+
// this avoids the unused warning
28+
$this->data = $data;
29+
// this avoids using more RAM than necassary :)
30+
$this->data = null;
2431
}
2532

2633
/**

0 commit comments

Comments
 (0)