1 | <?php |
||
2 | |||
3 | /** |
||
4 | * It's free open-source software released under the MIT License. |
||
5 | * |
||
6 | * @author Anatoly Nekhay <[email protected]> |
||
7 | * @copyright Copyright (c) 2021, Anatoly Nekhay |
||
8 | * @license https://github.com/sunrise-php/hydrator/blob/master/LICENSE |
||
9 | * @link https://github.com/sunrise-php/hydrator |
||
10 | */ |
||
11 | |||
12 | declare(strict_types=1); |
||
13 | |||
14 | namespace Sunrise\Hydrator\Annotation; |
||
15 | |||
16 | use Attribute; |
||
17 | |||
18 | /** |
||
19 | * @Annotation |
||
20 | * @Target({"PROPERTY"}) |
||
21 | * @NamedArgumentConstructor |
||
22 | * |
||
23 | * @Attributes({ |
||
24 | * @Attribute("value", type="string", required=true), |
||
25 | * }) |
||
26 | */ |
||
27 | #[Attribute(Attribute::TARGET_PROPERTY)] |
||
28 | final class Alias |
||
29 | { |
||
30 | /** |
||
31 | * @var non-empty-string |
||
0 ignored issues
–
show
Documentation
Bug
introduced
by
![]() |
|||
32 | * |
||
33 | * @readonly |
||
34 | */ |
||
35 | public string $value; |
||
36 | |||
37 | /** |
||
38 | * @param non-empty-string $value |
||
0 ignored issues
–
show
|
|||
39 | */ |
||
40 | 1 | public function __construct(string $value) |
|
41 | { |
||
42 | 1 | $this->value = $value; |
|
43 | } |
||
44 | } |
||
45 |