| 1 | <?php |
||
| 12 | final class Hydrate extends ObjectFacade |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | private $name; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Hydrate constructor. |
||
| 21 | * |
||
| 22 | * @param string $name |
||
| 23 | * @param string $class |
||
| 24 | */ |
||
| 25 | 9 | public function __construct(string $name, string $class) |
|
| 31 | |||
| 32 | /** |
||
| 33 | * @param string $name |
||
| 34 | * @param string $class |
||
| 35 | * |
||
| 36 | * @return Hydrate |
||
|
|
|||
| 37 | */ |
||
| 38 | 9 | public static function new(string $name, string $class): self |
|
| 42 | |||
| 43 | /** |
||
| 44 | * @param Hydrate $hydrate |
||
| 45 | * |
||
| 46 | * @return bool |
||
| 47 | */ |
||
| 48 | 5 | public function append(self $hydrate): bool |
|
| 58 | |||
| 59 | /** |
||
| 60 | * @param AssignableInterface $assignable |
||
| 61 | * |
||
| 62 | * @return bool |
||
| 63 | */ |
||
| 64 | 8 | public function assign(AssignableInterface $assignable): bool |
|
| 72 | |||
| 73 | /** |
||
| 74 | * @return string |
||
| 75 | */ |
||
| 76 | 5 | public function getClassName(): string |
|
| 80 | |||
| 81 | /** |
||
| 82 | * @return string |
||
| 83 | */ |
||
| 84 | 5 | public function getName(): string |
|
| 88 | } |
This check compares the return type specified in the
@returnannotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.