1 | <?php declare(strict_types=1); |
||
19 | class DefinitionAnalyzer |
||
20 | { |
||
21 | /** ClassAnalyzerInterface[] */ |
||
22 | protected $classAnalyzers = []; |
||
23 | /** MethodAnalyzerInterface[] */ |
||
24 | protected $methodAnalyzers = []; |
||
25 | /** PropertyAnalyzerInterface[] */ |
||
26 | protected $propertyAnalyzers = []; |
||
27 | /** ParameterAnalyzerInterface[] */ |
||
28 | protected $parameterAnalyzers = []; |
||
29 | |||
30 | /** |
||
31 | * Add class analyzer |
||
32 | * |
||
33 | * @param ClassAnalyzerInterface $classAnalyzer |
||
34 | * @return DefinitionAnalyzer |
||
35 | */ |
||
36 | 5 | public function addClassAnalyzer(ClassAnalyzerInterface $classAnalyzer): DefinitionAnalyzer |
|
42 | |||
43 | /** |
||
44 | * Add method analyzer |
||
45 | * |
||
46 | * @param MethodAnalyzerInterface $methodAnalyzer |
||
47 | * @return DefinitionAnalyzer |
||
48 | */ |
||
49 | 5 | public function addMethodAnalyzer(MethodAnalyzerInterface $methodAnalyzer): DefinitionAnalyzer |
|
55 | |||
56 | /** |
||
57 | * Add property analyzer |
||
58 | * |
||
59 | * @param PropertyAnalyzerInterface $propertyAnalyzer |
||
60 | * @return DefinitionAnalyzer |
||
61 | */ |
||
62 | 5 | public function addPropertyAnalyzer(PropertyAnalyzerInterface $propertyAnalyzer): DefinitionAnalyzer |
|
68 | |||
69 | /** |
||
70 | * Add parameter analyzer |
||
71 | * |
||
72 | * @param ParameterAnalyzerInterface $parameterAnalyzer |
||
73 | * @return DefinitionAnalyzer |
||
74 | */ |
||
75 | 5 | public function addParameterAnalyzer(ParameterAnalyzerInterface $parameterAnalyzer): DefinitionAnalyzer |
|
81 | |||
82 | /** |
||
83 | * Analyze definition builder |
||
84 | * |
||
85 | * @param DefinitionBuilder $definitionBuilder |
||
86 | * @throws ParameterNotFoundException |
||
87 | * @return bool |
||
88 | */ |
||
89 | 7 | public function analyze(DefinitionBuilder $definitionBuilder): bool |
|
116 | |||
117 | /** |
||
118 | * Analyze class |
||
119 | * |
||
120 | * @param ClassDefinition $classDefinition |
||
121 | * @param \ReflectionClass $reflectionClass |
||
122 | */ |
||
123 | 6 | protected function analyzeClass(ClassDefinition $classDefinition, \ReflectionClass $reflectionClass) |
|
130 | |||
131 | /** |
||
132 | * Analyze method |
||
133 | * |
||
134 | * @param \ReflectionClass $reflectionClass |
||
135 | * @param ClassDefinition $classDefinition |
||
136 | * @throws ParameterNotFoundException |
||
137 | */ |
||
138 | 6 | protected function analyzeMethod(\ReflectionClass $reflectionClass, ClassDefinition $classDefinition) |
|
148 | |||
149 | /** |
||
150 | * Analyze property |
||
151 | * |
||
152 | * @param \ReflectionClass $reflectionClass |
||
153 | * @param ClassDefinition $classDefinition |
||
154 | */ |
||
155 | 6 | protected function analyzeProperty(\ReflectionClass $reflectionClass, ClassDefinition $classDefinition) |
|
165 | |||
166 | /** |
||
167 | * Analyze parameter |
||
168 | * |
||
169 | * @param \ReflectionMethod $reflectionMethod |
||
170 | * @param ClassDefinition $classDefinition |
||
171 | * @throws ParameterNotFoundException |
||
172 | */ |
||
173 | 6 | protected function analyzeParameter(\ReflectionMethod $reflectionMethod, ClassDefinition $classDefinition) { |
|
182 | } |
||
183 |