| Conditions | 5 |
| Paths | 5 |
| Total Lines | 24 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | public function getHarvester() |
||
| 11 | { |
||
| 12 | if (null !== $this->harvest) { |
||
| 13 | return $this->harvest; |
||
| 14 | } |
||
| 15 | |||
| 16 | $filePath = $this->config->getRecorder()->getCacheFilePath($this->url); |
||
| 17 | if (null !== $filePath && file_exists($filePath)) { |
||
| 18 | $response = new ResponseFromCache( |
||
| 19 | $filePath, |
||
| 20 | $this->config->getBase().$this->url->getUri(), |
||
| 21 | json_decode(file_get_contents($filePath.'---info'), true) |
||
| 22 | ); |
||
| 23 | |||
| 24 | $this->harvest = new Harvest($response); |
||
| 25 | } |
||
| 26 | |||
| 27 | $this->harvest ?? $this->harvest = parent::getHarvester(); |
||
| 28 | |||
| 29 | if (null !== $this->config->getRobotsTxtCached()) { |
||
| 30 | $this->harvest->setRobotsTxt($this->config->getRobotsTxtCached()); |
||
|
|
|||
| 31 | } |
||
| 32 | |||
| 33 | return $this->harvest; |
||
| 34 | } |
||
| 36 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.