1 | <?php |
||
8 | class MixedContentObserver extends EmptyCrawlObserver |
||
9 | { |
||
10 | public function hasBeenCrawled(Url $crawledUrl, $response, Url $foundOnUrl = null) |
||
30 | |||
31 | /** |
||
32 | * Will be called when the host did not give a response for the given url. |
||
33 | * |
||
34 | * @param \Spatie\Crawler\Url $crawledUrl |
||
35 | */ |
||
36 | public function didNotRespond(Url $crawledUrl) |
||
39 | |||
40 | /** |
||
41 | * Will be called when mixed content was found. |
||
42 | * |
||
43 | * @param \Spatie\MixedContentScanner\MixedContent $mixedContent |
||
44 | */ |
||
45 | public function mixedContentFound(MixedContent $mixedContent) |
||
48 | |||
49 | /** |
||
50 | * Will be called when no mixed content was found on the given url. |
||
51 | * |
||
52 | * @param \Spatie\Crawler\Url $crawledUrl |
||
53 | */ |
||
54 | public function noMixedContentFound(Url $crawledUrl) |
||
57 | |||
58 | /** |
||
59 | * Will be called when the scanner has finished crawling. |
||
60 | */ |
||
61 | public function finishedCrawling() |
||
64 | } |
||
65 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.
In this case you can add the
@ignore
PhpDoc annotation to the duplicate definition and it will be ignored.