1 | <?php |
||
20 | class ServiceCredentialsFactory |
||
21 | { |
||
22 | /** |
||
23 | * @var CredentialsMapper |
||
24 | */ |
||
25 | protected $credentialsMapper; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $credentialsPath; |
||
31 | |||
32 | /** |
||
33 | * @var array |
||
34 | */ |
||
35 | protected $config; |
||
36 | |||
37 | /** |
||
38 | * @param CredentialsMapper $credentialsMapper |
||
39 | */ |
||
40 | public function __construct(CredentialsMapper $credentialsMapper) |
||
44 | |||
45 | /** |
||
46 | * @param string $credentialsPath |
||
47 | * @return $this |
||
48 | */ |
||
49 | public function setCredentialsPath($credentialsPath) |
||
54 | |||
55 | /** |
||
56 | * @param array $config |
||
57 | * @return $this |
||
58 | */ |
||
59 | public function setConfig(array $config) |
||
64 | |||
65 | /** |
||
66 | * Load sender`s notification services credentials |
||
67 | * |
||
68 | * @return $this |
||
69 | * @throws DomainException |
||
70 | */ |
||
71 | public function loadServiceCredentialsConfig() |
||
94 | |||
95 | /** |
||
96 | * Returns the list of names of notification services |
||
97 | * |
||
98 | * @return array |
||
99 | */ |
||
100 | public function getInitializedServices() |
||
104 | |||
105 | /** |
||
106 | * Returns credentials for notification service |
||
107 | * |
||
108 | * @param string $serviceName |
||
109 | * @throws DomainException |
||
110 | * @return array |
||
111 | */ |
||
112 | public function getCredentialsByService($serviceName) |
||
133 | |||
134 | /** |
||
135 | * @param string $serviceName |
||
136 | * @return \Zbox\UnifiedPush\Utils\ClientCredentials\CredentialsInterface |
||
137 | */ |
||
138 | private function getCredentialsDTOByServiceName($serviceName) |
||
160 | } |
||
161 |
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.