| Conditions | 3 |
| Paths | 4 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | public function find($path) |
||
| 42 | { |
||
| 43 | $image = $this->manager->find($this->class, $this->mapPathToId($path)); |
||
| 44 | |||
| 45 | if (!$image) { |
||
| 46 | // try to find the image without extension |
||
| 47 | $info = pathinfo($path); |
||
| 48 | $name = $info['dirname'].'/'.$info['filename']; |
||
| 49 | |||
| 50 | $image = $this->manager->find($this->class, $this->mapPathToId($name)); |
||
|
|
|||
| 51 | } |
||
| 52 | |||
| 53 | if (!$image) { |
||
| 54 | throw new NotLoadableException(sprintf('Source image was not found with id "%s"', $path)); |
||
| 55 | } |
||
| 56 | |||
| 57 | return stream_get_contents($this->getStreamFromImage($image)); |
||
| 58 | } |
||
| 59 | |||
| 78 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.