Skip to content

Commit

Permalink
Address minor comments
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr committed Dec 9, 2020
1 parent 676d2b7 commit c4ea37b
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion apps/files/lib/Controller/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ private function getShareTypes(Node $node) {
IShare::TYPE_REMOTE,
IShare::TYPE_EMAIL,
IShare::TYPE_ROOM,
IShare::TYPE_DECK
IShare::TYPE_DECK,
];
foreach ($requestedShareTypes as $requestedShareType) {
// one of each type is enough to find out about the types
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ private function getRoomShareHelper() {
throw new QueryException();
}

return $this->serverContainer->query('\OCA\Talk\Share\Helper\DeletedShareAPIController');
return $this->serverContainer->get('\OCA\Talk\Share\Helper\DeletedShareAPIController');
}

/**
Expand All @@ -237,6 +237,6 @@ private function getDeckShareHelper() {
throw new QueryException();
}

return $this->serverContainer->query('\OCA\Deck\Sharing\ShareAPIHelper');
return $this->serverContainer->get('\OCA\Deck\Sharing\ShareAPIHelper');
}
}
4 changes: 2 additions & 2 deletions apps/files_sharing/lib/Controller/ShareAPIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,7 @@ private function getRoomShareHelper() {
throw new QueryException();
}

return $this->serverContainer->query('\OCA\Talk\Share\Helper\ShareAPIController');
return $this->serverContainer->get('\OCA\Talk\Share\Helper\ShareAPIController');
}

/**
Expand All @@ -1575,7 +1575,7 @@ private function getDeckShareHelper() {
throw new QueryException();
}

return $this->serverContainer->query('\OCA\Deck\Sharing\ShareAPIHelper');
return $this->serverContainer->get('\OCA\Deck\Sharing\ShareAPIHelper');
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,7 @@ public function testCanAccessRoomShare(bool $expected, \OCP\Share\IShare $share,
->with($share, $this->currentUser)
->willReturn($canAccessShareByHelper);

$this->serverContainer->method('query')
$this->serverContainer->method('get')
->with('\OCA\Talk\Share\Helper\ShareAPIController')
->willReturn($helper);
}
Expand Down Expand Up @@ -2222,7 +2222,7 @@ function ($share) {
}
);

$this->serverContainer->method('query')
$this->serverContainer->method('get')
->with('\OCA\Talk\Share\Helper\ShareAPIController')
->willReturn($helper);

Expand Down Expand Up @@ -2340,7 +2340,7 @@ function ($share) {
}
);

$this->serverContainer->method('query')
$this->serverContainer->method('get')
->with('\OCA\Talk\Share\Helper\ShareAPIController')
->willReturn($helper);

Expand Down Expand Up @@ -4404,7 +4404,7 @@ public function testFormatRoomShare(array $expects, \OCP\Share\IShare $share, bo
->with($share)
->willReturn($formatShareByHelper);

$this->serverContainer->method('query')
$this->serverContainer->method('get')
->with('\OCA\Talk\Share\Helper\ShareAPIController')
->willReturn($helper);
}
Expand Down
3 changes: 2 additions & 1 deletion lib/private/Share/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ class Constants {
public const SHARE_TYPE_ROOM = 10;
// const SHARE_TYPE_USERROOM = 11; // Internal type used by RoomShareProvider
/**
* @deprecated 21.0.0 - use IShare::TYPE_ROOM instead
* @deprecated 21.0.0 - use IShare::TYPE_DECK instead
*/
public const SHARE_TYPE_DECK = 12;
// const SHARE_TYPE_DECK_USER = 13; // Internal type used by DeckShareProvider

public const FORMAT_NONE = -1;
public const FORMAT_STATUSES = -2;
Expand Down
3 changes: 2 additions & 1 deletion lib/public/Share/IShare.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ interface IShare {
public const TYPE_DECK = 12;

/**
* @internal 21.00
* @internal
* @since 21.0.0
*/
public const TYPE_DECK_USER = 13;

Expand Down

0 comments on commit c4ea37b

Please sign in to comment.