Skip to content

Commit cbbbe5a

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

68 files changed

Lines changed: 53 additions & 92 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/admin_audit/lib/AppInfo/Application.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99

1010
namespace OCA\AdminAudit\AppInfo;
1111

12-
use OCA\AdminAudit\Actions\Auth;
13-
use OCA\AdminAudit\Actions\Console;
1412
use OCA\AdminAudit\Actions\Files;
1513
use OCA\AdminAudit\Actions\Sharing;
1614
use OCA\AdminAudit\Actions\Trashbin;

apps/dav/lib/CalDAV/CalendarImpl.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
use Sabre\VObject\Component\VTimeZone;
3030
use Sabre\VObject\ITip\Message;
3131
use Sabre\VObject\ParseException;
32-
use Sabre\VObject\Property;
3332
use Sabre\VObject\Reader;
3433
use function Sabre\Uri\split as uriSplit;
3534

apps/dav/lib/CalDAV/Federation/CalendarFederationConfig.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@
99

1010
namespace OCA\DAV\CalDAV\Federation;
1111

12+
use OCP\GlobalScale\IConfig;
1213
use OCP\IAppConfig;
1314

1415
class CalendarFederationConfig {
1516
public function __construct(
1617
private readonly IAppConfig $appConfig,
17-
private \OCP\GlobalScale\IConfig $gsConfig,
18+
private IConfig $gsConfig,
1819
) {
1920
}
2021

apps/dav/lib/Connector/Sabre/File.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
namespace OCA\DAV\Connector\Sabre;
1010

1111
use Icewind\Streams\CallbackWrapper;
12-
use OC\AppFramework\Http\Request;
1312
use OC\Files\Filesystem;
1413
use OC\Files\Stream\HashWrapper;
1514
use OC\Files\View;

apps/dav/lib/Listener/CalendarDelegateActionListener.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use OCP\Calendar\Events\CalendarObjectUpdatedEvent;
1919
use OCP\EventDispatcher\Event;
2020
use OCP\EventDispatcher\IEventListener;
21+
use OCP\IL10N;
2122
use OCP\IUser;
2223
use OCP\IUserManager;
2324
use OCP\IUserSession;
@@ -210,7 +211,7 @@ private function sendNotification(
210211
/**
211212
* @return array{0: string, 1: string} [subject, heading]
212213
*/
213-
private function subjectAndHeading(\OCP\IL10N $l, string $action, string $actorName, string $summary, string $calendarName): array {
214+
private function subjectAndHeading(IL10N $l, string $action, string $actorName, string $summary, string $calendarName): array {
214215
return match ($action) {
215216
self::ACTION_CREATE => [
216217
$l->t('%1$s created "%2$s" on your behalf', [$actorName, $summary]),

apps/dav/tests/unit/CalDAV/CalDavBackendTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use OCA\DAV\CalDAV\Calendar;
1818
use OCA\DAV\DAV\Sharing\Plugin as SharingPlugin;
1919
use OCA\DAV\Events\CalendarDeletedEvent;
20+
use OCA\DAV\Exception\UidConflict;
2021
use OCP\IConfig;
2122
use OCP\IL10N;
2223
use Psr\Log\NullLogger;
@@ -264,7 +265,7 @@ public function testCalendarObjectsOperations(): void {
264265
}
265266

266267
public function testMultipleCalendarObjectsWithSameUID(): void {
267-
$this->expectException(\OCA\DAV\Exception\UidConflict::class);
268+
$this->expectException(UidConflict::class);
268269
$this->expectExceptionMessage('Calendar object with uid already exists in this calendar collection.');
269270

270271
$calendarId = $this->createTestCalendar();
@@ -364,7 +365,7 @@ public function testMoveCalendarObjectToCollectionWithSameUID(): void {
364365
$this->backend->createCalendarObject($targetCalendarId, 'target.ics', $calData);
365366
$sourceObject = $this->backend->getCalendarObject($sourceCalendarId, 'source.ics');
366367

367-
$this->expectException(\OCA\DAV\Exception\UidConflict::class);
368+
$this->expectException(UidConflict::class);
368369
$this->backend->moveCalendarObject(
369370
self::UNIT_TEST_USER,
370371
(int)$sourceObject['id'],

apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
namespace OCA\DAV\Tests\unit\Connector\Sabre;
1111

1212
use OCA\DAV\CalDAV\DefaultCalendarValidator;
13-
use OCA\DAV\Connector\Sabre\Directory;
14-
use OCA\DAV\Connector\Sabre\File;
1513
use OCA\DAV\DAV\CustomPropertiesBackend;
1614
use OCA\DAV\Db\PropertyMapper;
1715
use OCP\IDBConnection;

apps/encryption/lib/Util.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
namespace OCA\Encryption;
1010

11-
use OC\Files\Storage\Storage;
1211
use OC\Files\View;
1312
use OCA\Encryption\Crypto\Crypt;
1413
use OCP\Config\IUserConfig;

apps/federatedfilesharing/lib/FederatedShareProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use OC\Share20\Exception\InvalidShare;
1313
use OC\Share20\Share;
1414
use OCA\CloudFederationAPI\Db\OcmTokenMapMapper;
15+
use OCP\AppFramework\Db\DoesNotExistException;
1516
use OCP\Authentication\Exceptions\InvalidTokenException;
1617
use OCP\Authentication\Token\IToken;
1718
use OCP\Constants;
@@ -749,7 +750,7 @@ public function getShareByToken(string $token): IShare {
749750
->executeQuery();
750751

751752
$data = $cursor->fetch();
752-
} catch (InvalidTokenException|\OCP\AppFramework\Db\DoesNotExistException) {
753+
} catch (InvalidTokenException|DoesNotExistException) {
753754
// Token is not a valid access token or has no mapping, share not found
754755
}
755756
}

apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
use OCA\Files_Sharing\External\ExternalShareMapper;
2020
use OCA\Files_Sharing\External\Manager;
2121
use OCA\GlobalSiteSelector\Service\SlaveService;
22-
use OCA\Polls\Db\Share;
2322
use OCP\Activity\IManager as IActivityManager;
2423
use OCP\App\IAppManager;
2524
use OCP\Constants;

0 commit comments

Comments
 (0)