1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace AbterPhp\Admin\Http\Controllers; |
||
6 | |||
7 | use Opulence\Http\Requests\UploadedFile; |
||
8 | |||
9 | trait ApiDataTrait |
||
10 | { |
||
11 | protected string $problemBaseUrl; |
||
12 | |||
13 | /** |
||
14 | * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
||
15 | * |
||
16 | * @param array $data |
||
17 | * |
||
18 | * @return UploadedFile[] |
||
19 | */ |
||
20 | protected function getFileData(array $data): array |
||
0 ignored issues
–
show
|
|||
21 | { |
||
22 | return []; |
||
23 | } |
||
24 | |||
25 | /** |
||
26 | * @return array |
||
27 | */ |
||
28 | public function getCreateData(): array |
||
29 | { |
||
30 | return $this->getSharedData(); |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * @return array |
||
35 | */ |
||
36 | public function getUpdateData(): array |
||
37 | { |
||
38 | return $this->getSharedData(); |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * @return array |
||
43 | */ |
||
44 | public function getSharedData(): array |
||
45 | { |
||
46 | // @phan-suppress-next-line PhanUndeclaredProperty |
||
47 | return $this->request->getJsonBody(); |
||
48 | } |
||
49 | } |
||
50 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.