| Conditions | 4 |
| Paths | 4 |
| Total Lines | 20 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 39 | public function getLocalPath(): string |
||
| 40 | { |
||
| 41 | $path = $this->getPath(); |
||
| 42 | $disk = $this->getDisk()->getAdapter(); |
||
| 43 | |||
| 44 | if ($disk) { |
||
|
|
|||
| 45 | if ($this->getDisk()->isLocalDisk()) { |
||
| 46 | return $disk->path($path); |
||
| 47 | } |
||
| 48 | |||
| 49 | $temporaryDisk = $this->getDisk()->getTemporaryDisk(); |
||
| 50 | |||
| 51 | if (!$temporaryDisk->exists($path)) { |
||
| 52 | $temporaryDisk->writeStream($path, $disk->readStream($path)); |
||
| 53 | } |
||
| 54 | |||
| 55 | return $temporaryDisk->path($path); |
||
| 56 | } |
||
| 57 | |||
| 58 | return $path; |
||
| 59 | } |
||
| 68 |