Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | 15 | public function setFile($file, string $contentDisposition = null, bool $autoEtag = false, bool $autoLastModified = true) |
|
18 | { |
||
19 | // Wrap the file in our own \Swis\Filesystem\Encrypted\File class. |
||
20 | 15 | if (!$file instanceof File) { |
|
21 | 15 | if ($file instanceof \SplFileInfo) { |
|
22 | 3 | $file = new File($file->getPathname()); |
|
23 | } else { |
||
24 | 12 | $file = new File((string) $file); |
|
25 | } |
||
26 | } |
||
27 | |||
28 | 15 | return parent::setFile($file, $contentDisposition, $autoEtag, $autoLastModified); |
|
29 | } |
||
63 |