1 | <?php |
||
28 | class User extends AggregateRoot |
||
29 | { |
||
30 | /** |
||
31 | * @var IdInterface |
||
32 | * @Cubiche\Id |
||
33 | */ |
||
34 | protected $id; |
||
35 | |||
36 | /** |
||
37 | * @var StringLiteral |
||
38 | * @Cubiche\Field(type="StringLiteral", name="fullName") |
||
39 | */ |
||
40 | protected $name; |
||
41 | |||
42 | /** |
||
43 | * @var StringLiteral |
||
44 | * @Cubiche\Field(type="StringLiteral") |
||
45 | */ |
||
46 | protected $username; |
||
47 | |||
48 | /** |
||
49 | * @var int |
||
50 | * @Cubiche\Field(type="Integer") |
||
51 | */ |
||
52 | protected $age; |
||
53 | |||
54 | /** |
||
55 | * @var EmailAddress |
||
56 | * @Cubiche\Field(type="EmailAddress") |
||
57 | */ |
||
58 | protected $email; |
||
59 | |||
60 | /** |
||
61 | * @var ArraySetInterface |
||
62 | * @Cubiche\Field(type="ArraySet", of="Cubiche\Core\Metadata\Tests\Fixtures\Address") |
||
63 | */ |
||
64 | protected $addresses; |
||
65 | |||
66 | /** |
||
67 | * @var ArraySetInterface |
||
68 | * @Cubiche\Field(type="ArraySet", of="Cubiche\Core\Metadata\Tests\Fixtures\User") |
||
69 | */ |
||
70 | protected $friends; |
||
71 | |||
72 | /** |
||
73 | * @param UserId $id |
||
74 | * @param string $name |
||
75 | * @param string $username |
||
76 | * @param int $age |
||
77 | * @param string $email |
||
78 | */ |
||
79 | public function __construct(UserId $id, $name, $username, $age, $email) |
||
90 | |||
91 | /** |
||
92 | * @return StringLiteral |
||
93 | */ |
||
94 | public function name() |
||
98 | |||
99 | /** |
||
100 | * @return StringLiteral |
||
101 | */ |
||
102 | public function username() |
||
106 | |||
107 | /** |
||
108 | * @return int |
||
109 | */ |
||
110 | public function age() |
||
114 | |||
115 | /** |
||
116 | * @return EmailAddress |
||
117 | */ |
||
118 | public function email() |
||
122 | |||
123 | /** |
||
124 | * @return ArraySetInterface |
||
125 | */ |
||
126 | public function addresses() |
||
130 | |||
131 | /** |
||
132 | * @param Address $address |
||
133 | */ |
||
134 | public function addAddress(Address $address) |
||
138 | |||
139 | /** |
||
140 | * @return ArraySetInterface |
||
141 | */ |
||
142 | public function friends() |
||
146 | |||
147 | /** |
||
148 | * @param User $friend |
||
149 | */ |
||
150 | public function addFriend(User $friend) |
||
154 | } |
||
155 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..