1 | <?php |
||
17 | class FileBind |
||
18 | { |
||
19 | /** |
||
20 | * Bind the file to the with owner |
||
21 | * @internal |
||
22 | * |
||
23 | * @param Storage $storage The storage for the file |
||
24 | * @param int $ownerId The id of the owner |
||
25 | * @param int $ownerType The type of the owner |
||
26 | * @param int $fileId The id of the file |
||
27 | * @return rkit\filemanager\models\File|bool |
||
28 | */ |
||
29 | 20 | public function bindSingle($storage, $ownerId, $ownerType, $fileId) |
|
47 | |||
48 | /** |
||
49 | * Bind files to the with owner |
||
50 | * |
||
51 | * @param Storage $storage The storage for the files |
||
52 | * @param int $ownerId The id of the owner |
||
53 | * @param int $ownerType The type of the owner |
||
54 | * @param array $files Array of ids |
||
55 | * @return rkit\filemanager\models\File[]|bool |
||
56 | * @SuppressWarnings(PHPMD.ElseExpression) |
||
57 | */ |
||
58 | 3 | public function bindMultiple($storage, $ownerId, $ownerType, $files) |
|
86 | |||
87 | /** |
||
88 | * Save the temporary file to the storage |
||
89 | * |
||
90 | * @param File $file |
||
91 | * @param int $ownerId The id of the owner |
||
92 | * @return rkit\filemanager\models\File|bool |
||
93 | */ |
||
94 | 19 | private function saveTmpDirToStorage(File $file, $ownerId) |
|
104 | |||
105 | /** |
||
106 | * Delete current files |
||
107 | * |
||
108 | * @param Storage $storage |
||
109 | * @param int $ownerId The id of the owner |
||
110 | * @param int $ownerType The type of the owner |
||
111 | * @param rkit\filemanager\models\File[] $exceptFiles |
||
112 | * @return void |
||
113 | */ |
||
114 | 19 | private function deleteCurrentFiles($storage, $ownerId, $ownerType, $exceptFiles = []) |
|
125 | } |
||
126 |
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.