1 | <?php |
||
17 | class AbstractEntity extends stdClass |
||
18 | { |
||
19 | /** |
||
20 | * @var UuidInterface |
||
21 | */ |
||
22 | protected $id; |
||
23 | |||
24 | /** |
||
25 | * @return string |
||
26 | */ |
||
27 | 9 | public function getId(): string |
|
31 | |||
32 | /** |
||
33 | * @param string|null $id |
||
34 | * @return $this |
||
|
|||
35 | * @throws InvalidUuidStringException |
||
36 | */ |
||
37 | 74 | public function setId(string $id = null) |
|
56 | } |
||
57 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.