Total Complexity | 7 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Coverage | 63.16% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | trait Storage |
||
9 | { |
||
10 | protected $disk; |
||
11 | protected $path = ''; |
||
12 | protected $multiple = false; |
||
13 | |||
14 | protected function storeFile(UploadedFile $file, $filename, Request $request) |
||
|
|||
15 | { |
||
16 | $path = $file->storeAs($this->getPath(), $filename, [ |
||
17 | 'disk' => $this->getDisk(), |
||
18 | ]); |
||
19 | |||
20 | return $path; |
||
21 | } |
||
22 | |||
23 | public function multiple(bool $multiple = true) |
||
24 | { |
||
25 | $this->multiple = $multiple; |
||
26 | |||
27 | return $this; |
||
28 | } |
||
29 | |||
30 | 2 | public function isMultiple() |
|
31 | { |
||
32 | 2 | return $this->multiple; |
|
33 | } |
||
34 | |||
35 | 1 | public function disk(string $disk) |
|
36 | { |
||
37 | 1 | $this->disk = $disk; |
|
38 | |||
39 | 1 | return $this; |
|
40 | } |
||
41 | |||
42 | 1 | public function getDisk() |
|
45 | } |
||
46 | |||
47 | 1 | public function path(string $path) |
|
52 | } |
||
53 | |||
54 | 1 | public function getPath() |
|
57 | } |
||
58 | } |
||
59 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.