1 | <?php |
||
18 | final class AggregateVersion |
||
19 | { |
||
20 | /** |
||
21 | * @var int |
||
22 | */ |
||
23 | private $value; |
||
24 | |||
25 | /** |
||
26 | * Version constructor. |
||
27 | * |
||
28 | * @param int $value |
||
29 | */ |
||
30 | public function __construct(int $value) |
||
38 | |||
39 | /** |
||
40 | * Get version value. |
||
41 | * |
||
42 | * @return int |
||
43 | */ |
||
44 | public function getValue(): int |
||
48 | |||
49 | /** |
||
50 | * Check equality. |
||
51 | * |
||
52 | * @param AggregateVersion $version |
||
|
|||
53 | * |
||
54 | * @return bool |
||
55 | */ |
||
56 | public function isEqualTo(self $version): bool |
||
60 | |||
61 | /** |
||
62 | * Get next. |
||
63 | * |
||
64 | * @return self |
||
65 | */ |
||
66 | public function getNext(): self |
||
73 | } |
||
74 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.