1 | <?php |
||
16 | class Manager implements \IteratorAggregate |
||
17 | { |
||
18 | /** |
||
19 | * @var array |
||
20 | */ |
||
21 | private $providers; |
||
22 | |||
23 | /** |
||
24 | * @var Container |
||
25 | */ |
||
26 | private $container; |
||
27 | |||
28 | /** |
||
29 | * Manager constructor. |
||
30 | * @param array $providers |
||
31 | * @param Container $container |
||
32 | */ |
||
33 | public function __construct(array $providers, Container $container) |
||
41 | |||
42 | /** |
||
43 | * @param string $alias |
||
44 | * @param string|DataProviderInterface $provider |
||
45 | * @return $this|Manager |
||
46 | */ |
||
47 | public function register(string $alias, string $provider): Manager |
||
53 | |||
54 | /** |
||
55 | * @param string $alias |
||
56 | * @return DataProviderInterface |
||
57 | * @throws \InvalidArgumentException |
||
58 | */ |
||
59 | public function get(string $alias): DataProviderInterface |
||
67 | |||
68 | /** |
||
69 | * @return \Generator|DataProviderInterface[] |
||
70 | */ |
||
71 | public function getIterator(): \Generator |
||
77 | } |
||
78 |
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.