1 | <?php |
||
9 | final class Voys |
||
10 | { |
||
11 | const API_URL = 'https://api.voipgrid.nl/api/clicktodial/'; |
||
12 | |||
13 | /** |
||
14 | * @var Client |
||
15 | */ |
||
16 | private $client; |
||
17 | |||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | private $login; |
||
22 | |||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | private $password; |
||
27 | |||
28 | /** |
||
29 | * @param string $login |
||
30 | * @param string $password |
||
31 | */ |
||
32 | public function __construct(string $login, string $password) |
||
37 | |||
38 | /** |
||
39 | * @param string $fromPhonenumer |
||
40 | * @param string $toPhonenumer |
||
41 | * |
||
42 | * @return string |
||
43 | */ |
||
44 | public function callPhonenumer(string $toPhonenumer, string $fromPhonenumer): string |
||
63 | |||
64 | /** |
||
65 | * @param string $callid |
||
66 | * |
||
67 | * @return string |
||
68 | */ |
||
69 | public function getCallStatus(string $callid): string |
||
84 | |||
85 | /** |
||
86 | * @param string $login |
||
87 | * @param string $password |
||
88 | */ |
||
89 | private function validateLoginAndPassword(string $login, string $password): void |
||
101 | |||
102 | /** |
||
103 | * @param string $toPhonenumer |
||
104 | * @param string $fromPhonenumer |
||
105 | */ |
||
106 | private function validatePhonenumbers(string $toPhonenumer, string $fromPhonenumer): void |
||
111 | |||
112 | /** |
||
113 | * @param string $callid |
||
114 | */ |
||
115 | private function validateCallId($callid): void |
||
119 | } |
||
120 |
This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.
Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.