Skip to content

Commit df638fe

Browse files
refactor: Apply rector changes
Signed-off-by: GitHub <noreply@github.com>
1 parent e35426c commit df638fe

5 files changed

Lines changed: 10 additions & 7 deletions

File tree

‎apps/dav/lib/Server.php‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use OCA\DAV\CalDAV\Schedule\IMipPlugin;
2222
use OCA\DAV\CalDAV\Schedule\IMipService;
2323
use OCA\DAV\CalDAV\Security\RateLimitingPlugin;
24+
use OCA\DAV\CalDAV\SharingPlugin;
2425
use OCA\DAV\CalDAV\Validation\CalDavValidatePlugin;
2526
use OCA\DAV\CardDAV\HasPhotoPlugin;
2627
use OCA\DAV\CardDAV\ImageExportPlugin;
@@ -221,7 +222,7 @@ public function __construct(
221222
}
222223

223224
$this->server->addPlugin(new \Sabre\CalDAV\Notifications\Plugin());
224-
$this->server->addPlugin(new \OCA\DAV\CalDAV\SharingPlugin(\OCP\Server::get(\OCP\Share\IManager::class)));
225+
$this->server->addPlugin(new SharingPlugin(\OCP\Server::get(\OCP\Share\IManager::class)));
225226
$this->server->addPlugin(new PublishPlugin(
226227
\OCP\Server::get(IURLGenerator::class),
227228
\OCP\Server::get(\OCP\Share\IManager::class),

‎apps/files_trashbin/lib/Trashbin.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use OCA\FederatedFileSharing\FederatedShareProvider;
1919
use OCA\Files_Trashbin\Command\Expire;
2020
use OCA\Files_Trashbin\Events\BeforeNodeRestoredEvent;
21+
use OCA\Files_Trashbin\Events\NodeDeletedEvent;
2122
use OCA\Files_Trashbin\Events\NodeRestoredEvent;
2223
use OCA\Files_Trashbin\Exceptions\CopyRecursiveException;
2324
use OCA\Files_Versions\Storage;
@@ -31,7 +32,6 @@
3132
use OCP\Exceptions\AbortedEventException;
3233
use OCP\Files\Cache\IPropagator;
3334
use OCP\Files\Events\Node\BeforeNodeDeletedEvent;
34-
use OCP\Files\File;
3535
use OCP\Files\Folder;
3636
use OCP\Files\IMimeTypeLoader;
3737
use OCP\Files\IRootFolder;
@@ -705,7 +705,7 @@ public static function deleteAll(IUser $user): bool {
705705

706706
// Single-File Hooks
707707
foreach ($trashNodes as $trashNode) {
708-
$event = new Events\NodeDeletedEvent($trashNode->getPath());
708+
$event = new NodeDeletedEvent($trashNode->getPath());
709709
$dispatcher->dispatchTyped($event);
710710
}
711711

@@ -764,7 +764,7 @@ public static function delete(string $filename, string $user, ?int $timestamp =
764764

765765
$node->delete();
766766

767-
$event = new Events\NodeDeletedEvent($node->getPath());
767+
$event = new NodeDeletedEvent($node->getPath());
768768
$dispatcher->dispatchTyped($event);
769769

770770
if ($timestamp) {

‎composer.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tests/Core/Sharing/Recipient/GroupShareRecipientTypeTest.php‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use NCU\Sharing\ShareAccessContext;
1616
use OC\Core\Sharing\Recipient\GroupShareRecipientType;
1717
use OC\Group\Database;
18+
use OC\Group\DisplayNameCache;
1819
use OC\Sharing\SharingManager;
1920
use OCA\DAV\CardDAV\CardDavBackend;
2021
use OCA\DAV\CardDAV\ContactsManager;
@@ -110,7 +111,7 @@ public function testGetRecipientValues(): void {
110111

111112
public function testGetRecipientDisplayName(): void {
112113
// Clear display name cache, because setting the display name on the group doesn't update it in the cache of the manager
113-
/** @var \OC\Group\DisplayNameCache */
114+
/** @var DisplayNameCache */
114115
$displayNameCache = self::invokePrivate(Server::get(IGroupManager::class), 'displayNameCache');
115116
$displayNameCache->clear();
116117

‎tests/lib/Preview/MovieRemoteTest.php‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use OCP\Files\File;
2121
use OCP\Files\IRootFolder;
2222
use OCP\Files\Storage\IStorage;
23+
use OCP\IImage;
2324
use OCP\Lock\ILockingProvider;
2425
use OCP\Server;
2526

@@ -78,7 +79,7 @@ private function getJpeg(): string {
7879
return file_get_contents(\OC::$SERVERROOT . '/tests/data/testimage.jpg');
7980
}
8081

81-
private function getThumbnail(?File $file = null): ?\OCP\IImage {
82+
private function getThumbnail(?File $file = null): ?IImage {
8283
$file ??= new FileNode(Server::get(IRootFolder::class), $this->rootView, $this->imgPath);
8384
return $this->provider->getThumbnail($file, 256, 256);
8485
}

0 commit comments

Comments
 (0)