1 | <?php |
||
25 | abstract class TypeDefinitionDelegate extends DefinitionDelegate |
||
26 | { |
||
27 | /** |
||
28 | * @param Environment $env |
||
29 | */ |
||
30 | public function boot(Environment $env): void |
||
42 | |||
43 | /** |
||
44 | * @throws \Railt\Io\Exception\ExternalFileException |
||
45 | * @throws \Railt\Reflection\Exception\TypeNotFoundException |
||
46 | */ |
||
47 | private function register(): void |
||
56 | |||
57 | |||
58 | /** |
||
59 | * @param TypeDefinition $type |
||
60 | * @param Dictionary $dict |
||
61 | * @throws \Railt\Io\Exception\ExternalFileException |
||
62 | * @throws \Railt\Reflection\Exception\TypeNotFoundException |
||
63 | */ |
||
64 | private function verifyDuplication(TypeDefinition $type, Dictionary $dict): void |
||
74 | |||
75 | /** |
||
76 | * @param TypeDefinition|AbstractTypeDefinition $type |
||
77 | * @param RuleInterface $rule |
||
78 | */ |
||
79 | protected function addDescription(TypeDefinition $type, RuleInterface $rule): void |
||
88 | |||
89 | /** |
||
90 | * @param RuleInterface $rule |
||
91 | * @return string |
||
92 | */ |
||
93 | private function parseString(RuleInterface $rule): string |
||
99 | } |
||
100 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: