Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(external_storage): Cast id to int
  • Loading branch information
oleksandr-nc authored and backportbot[bot] committed Dec 3, 2024
commit e25bb2f0b3e5e4e3b0af6293af6614c3ce977883
4 changes: 2 additions & 2 deletions apps/files_external/lib/Service/StoragesService.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
* @return StorageConfig
* @throws NotFoundException if the storage with the given id was not found
*/
public function getStorage($id) {
public function getStorage(int $id) {
$mount = $this->dbConfig->getMountById($id);

if (!is_array($mount)) {
Expand Down Expand Up @@ -476,7 +476,7 @@
*
* @throws NotFoundException if no storage was found with the given id
*/
public function removeStorage($id) {
public function removeStorage(int $id) {

Check notice

Code scanning / Psalm

MissingReturnType Note

Method OCA\Files_External\Service\StoragesService::removeStorage does not have a return type, expecting void
$existingMount = $this->dbConfig->getMountById($id);

if (!is_array($existingMount)) {
Expand Down
Loading