1 | <?php |
||
21 | class TreeGenerator implements ConditionalTemplateGeneratorInterface |
||
22 | { |
||
23 | |||
24 | /** |
||
25 | * @var Configuration |
||
26 | */ |
||
27 | private $configuration; |
||
28 | |||
29 | /** |
||
30 | * @var TemplateFactoryInterface |
||
31 | */ |
||
32 | private $templateFactory; |
||
33 | |||
34 | /** |
||
35 | * @var array |
||
36 | */ |
||
37 | private $processed = []; |
||
38 | |||
39 | /** |
||
40 | * @var array[] |
||
41 | */ |
||
42 | private $treeStorage = [ |
||
43 | ElementsInterface::CLASSES => [], |
||
44 | ElementsInterface::INTERFACES => [], |
||
45 | ElementsInterface::TRAITS => [], |
||
46 | ElementsInterface::EXCEPTIONS => [] |
||
47 | ]; |
||
48 | |||
49 | /** |
||
50 | * @var ParserStorageInterface |
||
51 | */ |
||
52 | private $parserStorage; |
||
53 | |||
54 | |||
55 | public function __construct( |
||
56 | Configuration $configuration, |
||
57 | TemplateFactoryInterface $templateFactory, |
||
58 | ParserStorageInterface $parserStorage |
||
59 | ) { |
||
60 | $this->configuration = $configuration; |
||
61 | $this->templateFactory = $templateFactory; |
||
62 | $this->parserStorage = $parserStorage; |
||
63 | } |
||
64 | |||
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | public function generate() |
||
91 | |||
92 | |||
93 | /** |
||
94 | * {@inheritdoc} |
||
95 | */ |
||
96 | public function isAllowed() |
||
100 | |||
101 | |||
102 | /** |
||
103 | * @return bool |
||
104 | */ |
||
105 | private function canBeProcessed(ClassReflectionInterface $reflection) |
||
118 | |||
119 | |||
120 | private function addToTreeByReflection(ClassReflectionInterface $reflection) |
||
137 | |||
138 | |||
139 | /** |
||
140 | * @return string |
||
141 | */ |
||
142 | private function getTypeByReflection(ClassReflectionInterface $reflection) |
||
157 | |||
158 | |||
159 | private function sortTreeStorageElements() |
||
166 | } |
||
167 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.