Skip to content

Commit 94397e0

Browse files
committed
use constructor property promotion
1 parent 6d8fc87 commit 94397e0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Service/ServiceLocatorTrait.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,15 @@ class_exists(NotFoundExceptionInterface::class);
2626
*/
2727
trait ServiceLocatorTrait
2828
{
29-
private array $factories;
3029
private array $loading = [];
3130
private array $providedTypes;
3231

3332
/**
3433
* @param array<string, callable> $factories
3534
*/
36-
public function __construct(array $factories)
37-
{
38-
$this->factories = $factories;
35+
public function __construct(
36+
private array $factories,
37+
) {
3938
}
4039

4140
public function has(string $id): bool

0 commit comments

Comments
 (0)