| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 2 |
| 1 | <?php |
||
| 33 | public function find($path) |
||
| 34 | { |
||
| 35 | if ($this->filesystem->has($path) === false) { |
||
| 36 | throw new NotLoadableException(sprintf('Source image "%s" not found.', $path)); |
||
| 37 | } |
||
| 38 | |||
| 39 | $mimeType = $this->filesystem->getMimetype($path); |
||
| 40 | |||
| 41 | return new Binary( |
||
| 42 | $this->filesystem->read($path), |
||
| 43 | $mimeType, |
||
| 44 | $this->extensionGuesser->guess($mimeType) |
||
| 45 | ); |
||
| 46 | } |
||
| 47 | } |
||
| 48 |