1 | <?php |
||
21 | final class ToModelSerializer implements Serializer |
||
22 | { |
||
23 | private $className; |
||
24 | |||
25 | public function __construct(string $className) |
||
29 | |||
30 | public function serialize(array $data) |
||
46 | |||
47 | private function setClassName(string $className) : void |
||
52 | |||
53 | private function checkClassNameIsModel(string $className) : void |
||
60 | } |
||
61 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.