1 | <?php |
||
9 | class Ip2c |
||
10 | { |
||
11 | private $ip2cBaseUrl = 'http://ip2c.org'; |
||
12 | private $queryStringSelf = 'self'; |
||
13 | private $queryStringDec = 'dec='; |
||
14 | |||
15 | /** @var Request */ |
||
16 | private $request; |
||
17 | /** @var IpUtil */ |
||
18 | private $ipUtil; |
||
19 | |||
20 | /** |
||
21 | * Ip2c constructor. |
||
22 | * @param Request $request |
||
23 | * @param IpUtil $ipUtil |
||
24 | */ |
||
25 | 6 | public function __construct(Request $request, IpUtil $ipUtil) |
|
30 | |||
31 | /** |
||
32 | * @return Response |
||
33 | */ |
||
34 | 2 | public function self() |
|
38 | |||
39 | /** |
||
40 | * @param string $ip |
||
41 | * @return Response |
||
42 | */ |
||
43 | 2 | public function ip($ip) |
|
47 | |||
48 | /** |
||
49 | * @param int $ip2long |
||
50 | * @return Response |
||
51 | */ |
||
52 | 3 | public function dec($ip2long) |
|
56 | |||
57 | /** |
||
58 | * @param string $queryString |
||
59 | * @return Response |
||
60 | * @throws \Exception |
||
61 | */ |
||
62 | 4 | private function doRequest($queryString) |
|
66 | } |
||
67 |
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.