Conditions | 3 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | public function store(string $destination, $origin, $options = []): string |
||
21 | { |
||
22 | $destination = $this->path($destination); |
||
23 | if (is_resource($origin)) { |
||
24 | $origin = stream_get_contents($origin); |
||
25 | } |
||
26 | |||
27 | if ($this->filesystem()->disk($this->disk)->put($destination, $origin, $options)) { |
||
28 | event(new MergeAdded($destination)); |
||
|
|||
29 | |||
30 | return $destination; |
||
31 | } |
||
32 | |||
33 | return false; |
||
34 | } |
||
36 |