Skip to content

Commit a465955

Browse files
authored
Changed all annotations which only support PHP >= 8.0. (#4669)
1 parent 78ec836 commit a465955

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

src/Annotation/Aspect.php

+3-5
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@
1616
#[Attribute(Attribute::TARGET_CLASS)]
1717
class Aspect extends AbstractAnnotation
1818
{
19-
public array $classes = [];
20-
21-
public array $annotations = [];
22-
23-
public ?int $priority = null;
19+
public function __construct(public array $classes = [], public array $annotations = [], public ?int $priority = null)
20+
{
21+
}
2422

2523
public function collectClass(string $className): void
2624
{

src/Annotation/Inject.php

+3-5
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@
2020
#[Attribute(Attribute::TARGET_PROPERTY)]
2121
class Inject extends AbstractAnnotation
2222
{
23-
public ?string $value = null;
24-
25-
public bool $required = true;
26-
27-
public bool $lazy = false;
23+
public function __construct(public ?string $value = null, public bool $required = true, public bool $lazy = false)
24+
{
25+
}
2826

2927
public function collectProperty(string $className, ?string $target): void
3028
{

0 commit comments

Comments
 (0)