1 | <?php |
||
10 | abstract class Api implements ApiContract |
||
11 | { |
||
12 | /** |
||
13 | * $request. |
||
14 | * |
||
15 | * @var \Illuminate\Http\Request |
||
16 | */ |
||
17 | protected $request; |
||
18 | |||
19 | /** |
||
20 | * $files. |
||
21 | * |
||
22 | * @var \Recca0120\Upload\Filesystem |
||
23 | */ |
||
24 | protected $files; |
||
25 | |||
26 | /** |
||
27 | * $chunkFile. |
||
28 | * |
||
29 | * @var \Recca0120\Upload\ChunkFileFactory |
||
30 | */ |
||
31 | protected $ChunkFileFactory; |
||
32 | |||
33 | /** |
||
34 | * $config. |
||
35 | * |
||
36 | * @var array |
||
37 | */ |
||
38 | protected $config; |
||
39 | |||
40 | /** |
||
41 | * __construct. |
||
42 | * |
||
43 | * @param array $config |
||
44 | * @param \Illuminate\Http\Request $request |
||
45 | * @param \Recca0120\Upload\Filesystem $files |
||
46 | * @param \Recca0120\Upload\ChunkFile $chunkFile |
||
|
|||
47 | */ |
||
48 | 24 | public function __construct($config = [], Request $request = null, Filesystem $files = null, ChunkFileFactory $chunkFileFactory = null) |
|
60 | |||
61 | /** |
||
62 | * domain. |
||
63 | * |
||
64 | * @return string |
||
65 | */ |
||
66 | 1 | public function domain() |
|
70 | |||
71 | /** |
||
72 | * path. |
||
73 | * |
||
74 | * @return string |
||
75 | */ |
||
76 | 1 | public function path() |
|
80 | |||
81 | /** |
||
82 | * makeDirectory. |
||
83 | * |
||
84 | * @return $this |
||
85 | */ |
||
86 | 11 | public function makeDirectory($path) |
|
94 | |||
95 | /** |
||
96 | * cleanDirectory. |
||
97 | * |
||
98 | * @param string $path |
||
99 | * @return $this |
||
100 | */ |
||
101 | 2 | public function cleanDirectory($path) |
|
116 | |||
117 | /** |
||
118 | * receive. |
||
119 | * |
||
120 | * @param string $inputName |
||
121 | * @return \Symfony\Component\HttpFoundation\File\UploadedFile |
||
122 | * |
||
123 | * @throws \Recca0120\Upload\Exceptions\ChunkedResponseException |
||
124 | */ |
||
125 | abstract public function receive($inputName); |
||
126 | |||
127 | /** |
||
128 | * deleteUploadedFile. |
||
129 | * |
||
130 | * @param \Symfony\Component\HttpFoundation\File\UploadedFile |
||
131 | * @return $this |
||
132 | */ |
||
133 | 1 | public function deleteUploadedFile(UploadedFile $uploadedFile) |
|
143 | |||
144 | /** |
||
145 | * completedResponse. |
||
146 | * |
||
147 | * @param \Illuminate\Http\JsonResponse $response |
||
148 | * @return \Illuminate\Http\JsonResponse |
||
149 | */ |
||
150 | 1 | public function completedResponse(JsonResponse $response) |
|
154 | |||
155 | /** |
||
156 | * chunkPath. |
||
157 | * |
||
158 | * @return string |
||
159 | */ |
||
160 | 10 | protected function chunkPath() |
|
166 | |||
167 | /** |
||
168 | * storagePath. |
||
169 | * |
||
170 | * @return string |
||
171 | */ |
||
172 | 9 | protected function storagePath() |
|
178 | |||
179 | protected function createChunkFile($name, $uuid = null) |
||
185 | } |
||
186 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.