1 | <?php |
||
10 | class MailBrokenLinks extends BaseReporter |
||
11 | { |
||
12 | /** |
||
13 | * @var Mailer |
||
14 | */ |
||
15 | protected $mail; |
||
16 | |||
17 | /** |
||
18 | * MailBrokenLinks constructor. |
||
19 | * |
||
20 | * @param \Illuminate\Contracts\Mail\Mailer $mail |
||
21 | */ |
||
22 | public function __construct(Mailer $mail) |
||
26 | |||
27 | /** |
||
28 | * Called when the crawl has ended. |
||
29 | */ |
||
30 | public function finishedCrawling() |
||
44 | |||
45 | /** |
||
46 | * Called when the crawler has crawled the given url successfully. |
||
47 | * |
||
48 | * @param \Psr\Http\Message\UriInterface $url |
||
49 | * @param \Psr\Http\Message\ResponseInterface $response |
||
50 | * @param \Psr\Http\Message\UriInterface|null $foundOnUrl |
||
51 | */ |
||
52 | public function crawled( |
||
61 | |||
62 | /** |
||
63 | * Called when the crawler had a problem crawling the given url. |
||
64 | * |
||
65 | * @param \Psr\Http\Message\UriInterface $url |
||
66 | * @param \GuzzleHttp\Exception\RequestException $requestException |
||
67 | * @param \Psr\Http\Message\UriInterface|null $foundOnUrl |
||
68 | */ |
||
69 | public function crawlFailed( |
||
76 | } |
||
77 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: