Skip to content

Commit ce72138

Browse files
committed
fix: simplify random generator usage for PHPStan
1 parent fa62051 commit ce72138

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/Model/TemplateEngine/Decorator/InspectorHintsFactory.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class InspectorHintsFactory
1515
{
1616
/**
1717
* @param Random $random
18+
* @phpstan-ignore property.onlyWritten
1819
*/
1920
public function __construct(
2021
private readonly Random $random
@@ -38,13 +39,10 @@ public function create(array $data = []): InspectorHints
3839
);
3940
}
4041

41-
// Extract random generator to satisfy PHPStan (readonly property usage detection)
42-
$randomGenerator = $this->random;
43-
4442
return new InspectorHints(
4543
$subject,
4644
(bool)$showBlockHints,
47-
$randomGenerator
45+
$this->random
4846
);
4947
}
5048
}

0 commit comments

Comments
 (0)