| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 35 | public function discover(Resource $resource) |
||
| 36 | { |
||
| 37 | $crawler = $this->getFilteredCrawler($resource); |
||
| 38 | |||
| 39 | $uris = array(); |
||
| 40 | foreach ($crawler as $node) { |
||
| 41 | try { |
||
| 42 | $uris[] = new DiscoveredUri(new Uri($node->getAttribute('href'), $resource->getUri()->toString())); |
||
| 43 | } catch (UriSyntaxException $e) { |
||
| 44 | // do nothing. We simply ignore invalid URI's |
||
| 45 | } |
||
| 46 | } |
||
| 47 | return $uris; |
||
| 48 | } |
||
| 49 | } |
||
| 50 |
For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a
@returndoc comment to communicate to implementors of these methods what they are expected to return.