| Conditions | 2 |
| Paths | 2 |
| Total Lines | 7 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | public function generateUrl(object $object, string $fileProperty, Filesystem $filesystem, string $path): string |
||
| 28 | { |
||
| 29 | if (!$filesystem instanceof FlysystemTemporaryUrlGenerator) { |
||
| 30 | throw new InvalidArgumentException(sprintf('The public URL generator requires a filesystem implementing %s', FlysystemTemporaryUrlGenerator::class)); |
||
| 31 | } |
||
| 32 | |||
| 33 | return $filesystem->temporaryUrl($path, new \DateTime($this->expires), new Config($this->config)); |
||
|
|
|||
| 34 | } |
||
| 36 |