1 | <?php |
||
23 | class CompositeSettingProvider implements SettingProviderInterface |
||
24 | { |
||
25 | /** |
||
26 | * @var SettingProviderInterface |
||
27 | */ |
||
28 | private $localProvider; |
||
29 | |||
30 | /** |
||
31 | * @var SettingProviderInterface |
||
32 | */ |
||
33 | private $remoteProvider; |
||
34 | |||
35 | /** |
||
36 | * @param SettingProviderInterface $localProvider |
||
37 | * @param SettingProviderInterface $remoteProvider |
||
38 | */ |
||
39 | 4 | public function __construct(SettingProviderInterface $localProvider, SettingProviderInterface $remoteProvider) |
|
44 | |||
45 | /** |
||
46 | * {@inheritdoc} |
||
47 | */ |
||
48 | 2 | public function findUserSettings(string $owner): Collection |
|
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | 1 | public function findGlobalSettings(): Collection |
|
66 | |||
67 | /** |
||
68 | * @param Collection $remotes |
||
69 | * @param Collection $locals |
||
70 | * |
||
71 | * @return ArrayCollection |
||
72 | */ |
||
73 | 3 | private function mergeSettings(Collection $remotes, Collection $locals): ArrayCollection |
|
86 | |||
87 | /** |
||
88 | * @param Collection $remote |
||
89 | * @param SettingInterface $object |
||
90 | * |
||
91 | * @return bool |
||
92 | */ |
||
93 | private function exists(Collection $remote, SettingInterface $object): bool |
||
99 | } |
||
100 |
This check looks at variables that 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.