Skip to content

Commit

Permalink
Make psalm happy again
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Nov 10, 2023
1 parent d0a6680 commit c6111f2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/Controller/FederationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public function initiatorUser($token): DataResponse {
return new DataResponse([
'userId' => $user->getUID(),
'displayName' => $user->getDisplayName(),
'avatar' => $this->urlGenerator->linkToRouteAbsolute('core.avatar.getAvatar', ['userId' => $wopi->getEditorUid(), 'size' => WopiControllerTest::WOPI_AVATAR_SIZE])
'avatar' => $this->urlGenerator->linkToRouteAbsolute('core.avatar.getAvatar', ['userId' => $wopi->getEditorUid(), 'size' => WopiController::WOPI_AVATAR_SIZE])
]);
} catch (UnknownTokenException $e) {
$this->logger->debug('COOL-Federation-Initiator-User: Token ' . $token . 'not found');
Expand Down
2 changes: 0 additions & 2 deletions lib/Controller/WopiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
namespace OCA\Richdocuments\Controller;

use OCA\Files_Versions\Versions\IVersionManager;
use OCA\Richdocuments\AppConfig;
use OCA\Richdocuments\AppInfo\Application;
use OCA\Richdocuments\Db\Wopi;
use OCA\Richdocuments\Db\WopiMapper;
Expand All @@ -48,7 +47,6 @@
use OCP\Files\File;
use OCP\Files\Folder;
use OCP\Files\GenericFileException;
use OCP\Files\InvalidPathException;
use OCP\Files\IRootFolder;
use OCP\Files\Lock\ILock;
use OCP\Files\Lock\ILockManager;
Expand Down
4 changes: 2 additions & 2 deletions tests/lib/PermissionManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function testIsEnabledForUserEnabledNotInGroup() {
$this->groupManager
->expects(self::any())
->method('getUserGroupIds')
->willReturnCallback(function($user) {
->willReturnCallback(function ($user) {
return [];
});

Expand Down Expand Up @@ -159,7 +159,7 @@ public function testFeatureLock($editGroups, $userGroups, $result): void {
$this->groupManager
->expects(self::any())
->method('isInGroup')
->willReturnCallback(function($user, $group) {
->willReturnCallback(function ($user, $group) {
if ($user === 'TestUser' && $group === 'Enabled2') {
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions tests/lib/Service/WatermarkServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function dataWatermark(): Generator {
private function createWatermarkConfigMock(array $config): void {
$this->config->expects(self::any())
->method('getAppValue')
->willReturnCallback(function($app, $key, $default) use ($config) {
->willReturnCallback(function ($app, $key, $default) use ($config) {
if (isset($config[$key])) {
if (is_bool($config[$key])) {
return $config[$key] ? 'yes' : 'no';
Expand All @@ -148,7 +148,7 @@ public function testWatermark(bool $isPublic, ?string $user, array $config, bool
$this->createWatermarkConfigMock($config);
$this->groupManager->expects(self::any())
->method('isInGroup')
->willReturnCallback(function($userId, $groupId) {
->willReturnCallback(function ($userId, $groupId) {
return ($userId === 'user1' && $groupId === 'group1');
});

Expand Down

0 comments on commit c6111f2

Please sign in to comment.