1 | <?php |
||
8 | class Image extends File |
||
9 | { |
||
10 | /** |
||
11 | * Validation rules. |
||
12 | * |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $rules = 'image'; |
||
16 | |||
17 | /** |
||
18 | * Intervention calls. |
||
19 | * |
||
20 | * @var array |
||
21 | */ |
||
22 | protected $calls = []; |
||
23 | |||
24 | /** |
||
25 | * Get default storage path. |
||
26 | * |
||
27 | * @return mixed |
||
28 | */ |
||
29 | public function defaultStorePath() |
||
33 | |||
34 | /** |
||
35 | * Prepare for single upload file. |
||
36 | * |
||
37 | * @param UploadedFile|null $image |
||
38 | * |
||
39 | * @return string |
||
40 | */ |
||
41 | protected function prepareForSingle(UploadedFile $image = null) |
||
53 | |||
54 | /** |
||
55 | * Execute Intervention calls. |
||
56 | * |
||
57 | * @param string $target |
||
58 | * |
||
59 | * @return mixed |
||
60 | */ |
||
61 | public function executeCalls($target) |
||
73 | |||
74 | /** |
||
75 | * Build a preview item. |
||
76 | * |
||
77 | * @param string $image |
||
78 | * @return string |
||
79 | */ |
||
80 | protected function buildPreviewItem($image) |
||
84 | |||
85 | /** |
||
86 | * Render a image form field. |
||
87 | * |
||
88 | * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View |
||
89 | */ |
||
90 | public function render() |
||
96 | |||
97 | /** |
||
98 | * Call intervention methods. |
||
99 | * |
||
100 | * @param string $method |
||
101 | * @param array $arguments |
||
102 | * @return $this |
||
103 | */ |
||
104 | public function __call($method, $arguments) |
||
113 | } |
||
114 |
It seems like you allow that null is being passed for a parameter, however the function which is called does not seem to accept null.
We recommend to add an additional type check (or disallow null for the parameter):