1 | <?php |
||
18 | class ContainerCompiler |
||
19 | { |
||
20 | private $configTree; |
||
21 | private $plugins; |
||
22 | private $file; |
||
23 | private $code; |
||
|
|||
24 | |||
25 | |||
26 | /** |
||
27 | * Construct the compiler |
||
28 | * |
||
29 | * @param array $configTree |
||
30 | * @param PluginInterface[] $plugins |
||
31 | * @param null $file |
||
32 | */ |
||
33 | public function __construct($configTree, $plugins, $file) |
||
39 | |||
40 | |||
41 | /** |
||
42 | * Writes the code to a temporary file and returns the resulting Container object. |
||
43 | * |
||
44 | * @return mixed |
||
45 | * |
||
46 | * @throws \LogicException |
||
47 | */ |
||
48 | public function getContainer() |
||
69 | |||
70 | |||
71 | /** |
||
72 | * Add a plugin |
||
73 | * |
||
74 | * @param \Zicht\Tool\PluginInterface $p |
||
75 | * @return void |
||
76 | */ |
||
77 | public function addPlugin(PluginInterface $p) |
||
81 | |||
82 | |||
83 | /** |
||
84 | * Crude check for whether a recompile is needed. |
||
85 | * |
||
86 | * @return bool |
||
87 | */ |
||
88 | protected function needsRecompile() |
||
96 | |||
97 | |||
98 | /** |
||
99 | * Returns the code for initializing the container. |
||
100 | * |
||
101 | * @return string |
||
102 | */ |
||
103 | public function compileContainerCode() |
||
117 | } |
||
118 |
This check marks private properties in classes that are never used. Those properties can be removed.