1 | <?php |
||
25 | class Container implements ContainerInterface |
||
26 | { |
||
27 | |||
28 | use ContainerCookieTrait; |
||
29 | use ContainerGlobalsTrait; |
||
30 | use ContainerSessionTrait; |
||
31 | |||
32 | /** |
||
33 | * @var ContainerInterface |
||
34 | */ |
||
35 | public static $app; |
||
36 | |||
37 | /** |
||
38 | * @var array |
||
39 | */ |
||
40 | protected $objects = []; |
||
41 | |||
42 | /** |
||
43 | * @var array |
||
44 | */ |
||
45 | protected $bind = []; |
||
46 | |||
47 | /** |
||
48 | * @return ContainerInterface |
||
49 | */ |
||
50 | public static function app(): ContainerInterface |
||
58 | |||
59 | /** |
||
60 | * @param $app |
||
61 | */ |
||
62 | public function setServices(array $app): void |
||
76 | |||
77 | /** |
||
78 | * @param $key |
||
79 | * |
||
80 | * @return mixed |
||
81 | */ |
||
82 | public function get(string $key = null) |
||
86 | |||
87 | /** |
||
88 | * @param string $key |
||
89 | * @param $object |
||
90 | * @param array $params |
||
91 | * |
||
92 | * @return object|void |
||
93 | */ |
||
94 | public function set(string $key, $object, $params = null) |
||
102 | |||
103 | /** |
||
104 | * @param string $key |
||
105 | * @param $object |
||
106 | */ |
||
107 | protected function rawSet(string $key, $object) |
||
111 | |||
112 | /** |
||
113 | * @param $key |
||
114 | * @param $object |
||
115 | * @param null $params |
||
116 | * |
||
117 | * @return object |
||
118 | */ |
||
119 | protected function iOc(string $key, $object, $params = null) |
||
136 | |||
137 | /** |
||
138 | * @param $object |
||
139 | * @param null $params |
||
140 | * |
||
141 | * @return object |
||
142 | */ |
||
143 | public function new($object, $params = null) |
||
160 | |||
161 | /** |
||
162 | * @param $constructor |
||
163 | * @param $params |
||
164 | * |
||
165 | * @return array |
||
166 | */ |
||
167 | protected function getParamsIoC($constructor, $params) |
||
182 | |||
183 | /** |
||
184 | * @param $key |
||
185 | * |
||
186 | * @return bool |
||
187 | */ |
||
188 | public function has(string $key): bool |
||
192 | |||
193 | /** |
||
194 | * @param string $key |
||
195 | * @param string $param |
||
196 | * |
||
197 | * @return mixed |
||
198 | */ |
||
199 | public function getParam(string $key, string $param) |
||
207 | |||
208 | /** |
||
209 | * @param string $key |
||
210 | * @param string $param |
||
211 | * @param $value |
||
212 | */ |
||
213 | public function setParam(string $key, string $param, $value): void |
||
219 | |||
220 | /** |
||
221 | * @param string $key |
||
222 | * @param string $param |
||
223 | * |
||
224 | * @return bool |
||
225 | */ |
||
226 | public function hasParam(string $key, string $param) |
||
232 | |||
233 | /** |
||
234 | * @param string $key |
||
235 | * |
||
236 | * @return mixed|string |
||
237 | */ |
||
238 | public function getBinding(string $key) |
||
242 | |||
243 | /** |
||
244 | * @param string $key |
||
245 | * @param $value |
||
246 | */ |
||
247 | public function setBinding(string $key, $value): void |
||
251 | } |
||
252 |
This check looks at variables that have been passed in as parameters and are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.