1 | <?php |
||
9 | class Checker |
||
10 | { |
||
11 | /** |
||
12 | * @var Client |
||
13 | */ |
||
14 | protected $guzzle; |
||
15 | |||
16 | /** |
||
17 | * Create a new Instance |
||
18 | */ |
||
19 | 5 | public function __construct() |
|
23 | |||
24 | /** |
||
25 | * Perform the check of a URL |
||
26 | * |
||
27 | * @param string $url URL to check |
||
28 | * @param int $timeout timeout for the request. Defaults to 5 seconds |
||
29 | * @return UrlStatus |
||
30 | * @throws UrlMalformedException |
||
31 | */ |
||
32 | 5 | public function check($url, $timeout = 5) |
|
75 | |||
76 | /** |
||
77 | * Validate that a url is a valid url |
||
78 | * |
||
79 | * @param string $url |
||
80 | * @throws UrlMalformedException |
||
81 | */ |
||
82 | 5 | private function validateUrl($url) |
|
88 | } |
||
89 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: