1 | <?php |
||
11 | class Files |
||
12 | { |
||
13 | |||
14 | /** |
||
15 | * @var B2Client |
||
16 | */ |
||
17 | protected $B2Client; |
||
18 | |||
19 | /** |
||
20 | * Files constructor. |
||
21 | * @param B2Client $B2Client |
||
22 | */ |
||
23 | 3 | public function __construct(B2Client $B2Client) |
|
27 | |||
28 | /** |
||
29 | * @param $bucketId |
||
30 | * @param $startFileName |
||
31 | * @return mixed |
||
32 | * @throws \Exception |
||
33 | */ |
||
34 | public function listFileNames($bucketId, $startFileName = null, $maxFileCount = 100) |
||
42 | |||
43 | /** |
||
44 | * Lists all files in a bucket and starting filename. For very large buckets this may fail, use listFileNames() directly |
||
45 | * |
||
46 | * @param $bucketId |
||
47 | * @param $startFileName |
||
48 | * @return array |
||
49 | */ |
||
50 | public function listAllFileNames($bucketId, $startFileName) |
||
64 | |||
65 | /** |
||
66 | * @param $fileID |
||
67 | * @return mixed |
||
68 | * @throws \Exception |
||
69 | */ |
||
70 | public function getFileInfo($fileId) |
||
74 | |||
75 | /** |
||
76 | * @param $bucketId |
||
77 | * @return mixed |
||
78 | * @throws \Exception |
||
79 | */ |
||
80 | public function getUploadUrl($bucketId) |
||
84 | |||
85 | /** |
||
86 | * @param $bucketId |
||
87 | * @param string $filePath The path to the local file |
||
88 | * @param string $fileName The name/path on B2 |
||
89 | * @param string $contentType |
||
90 | * @param null $uploadUrl |
||
|
|||
91 | * @return array |
||
92 | */ |
||
93 | public function uploadFile($bucketId, $filePath, $fileName, $contentType, $uploadUrlResponse = []) |
||
109 | |||
110 | /** |
||
111 | * @param $bucketId |
||
112 | * @param $fileName |
||
113 | * @return mixed |
||
114 | * @throws \Exception |
||
115 | */ |
||
116 | public function downloadFileByName($bucketName, $fileName) |
||
120 | |||
121 | } |
||
122 |
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.