1 | <?php |
||
12 | class Resource |
||
13 | { |
||
14 | /** @var DiscoveredUri */ |
||
15 | protected $uri; |
||
16 | |||
17 | /** @var Response */ |
||
18 | protected $response; |
||
19 | |||
20 | /** @var Crawler */ |
||
21 | protected $crawler; |
||
22 | |||
23 | /** @var string */ |
||
24 | protected $body; |
||
25 | |||
26 | /** |
||
27 | * @param DiscoveredUri $uri |
||
28 | * @param Response $response |
||
29 | */ |
||
30 | public function __construct(DiscoveredUri $uri, Response $response) |
||
38 | |||
39 | /** |
||
40 | * Lazy loads a Crawler object based on the Response; |
||
41 | * @return Crawler |
||
42 | */ |
||
43 | public function getCrawler() |
||
54 | |||
55 | /** |
||
56 | * @return UriInterface |
||
57 | */ |
||
58 | public function getUri() |
||
62 | |||
63 | /** |
||
64 | * @return Response |
||
65 | */ |
||
66 | public function getResponse() |
||
70 | |||
71 | public function __sleep() |
||
83 | |||
84 | /** |
||
85 | * We need to set the body again after deserialization because it was a stream that didn't get serialized |
||
86 | */ |
||
87 | public function __wakeup() |
||
91 | } |
||
92 |
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.