diff --git a/composer.lock b/composer.lock index 5b9ce354bc8..b56cd2d5502 100644 --- a/composer.lock +++ b/composer.lock @@ -77,6 +77,52 @@ ], "time": "2022-12-30T00:23:10+00:00" }, + { + "name": "kubawerlos/php-cs-fixer-custom-fixers", + "version": "v3.22.0", + "source": { + "type": "git", + "url": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers.git", + "reference": "8701394f0c7cd450ac4fa577d24589122c1d5d5e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/8701394f0c7cd450ac4fa577d24589122c1d5d5e", + "reference": "8701394f0c7cd450ac4fa577d24589122c1d5d5e", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "ext-tokenizer": "*", + "friendsofphp/php-cs-fixer": "^3.61.1", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.6.4 || ^10.5.29" + }, + "type": "library", + "autoload": { + "psr-4": { + "PhpCsFixerCustomFixers\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kuba Werłos", + "email": "werlos@gmail.com" + } + ], + "description": "A set of custom fixers for PHP CS Fixer", + "support": { + "issues": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/issues", + "source": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.22.0" + }, + "time": "2024-08-16T20:44:35+00:00" + }, { "name": "myclabs/deep-copy", "version": "1.12.0", @@ -139,19 +185,20 @@ }, { "name": "nextcloud/coding-standard", - "version": "v1.2.3", + "version": "v1.3.1", "source": { "type": "git", "url": "https://github.com/nextcloud/coding-standard.git", - "reference": "bc9c53a5306114b60c4363057aff9c2ed10a54da" + "reference": "e88acb0df6217b808d1632286ddfec9267a102e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/bc9c53a5306114b60c4363057aff9c2ed10a54da", - "reference": "bc9c53a5306114b60c4363057aff9c2ed10a54da", + "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/e88acb0df6217b808d1632286ddfec9267a102e4", + "reference": "e88acb0df6217b808d1632286ddfec9267a102e4", "shasum": "" }, "require": { + "kubawerlos/php-cs-fixer-custom-fixers": "^3.22", "php": "^7.3|^8.0", "php-cs-fixer/shim": "^3.17" }, @@ -174,9 +221,9 @@ "description": "Nextcloud coding standards for the php cs fixer", "support": { "issues": "https://github.com/nextcloud/coding-standard/issues", - "source": "https://github.com/nextcloud/coding-standard/tree/v1.2.3" + "source": "https://github.com/nextcloud/coding-standard/tree/v1.3.1" }, - "time": "2024-08-23T14:32:32+00:00" + "time": "2024-09-19T09:07:10+00:00" }, { "name": "nextcloud/ocp", @@ -401,16 +448,16 @@ }, { "name": "php-cs-fixer/shim", - "version": "v3.62.0", + "version": "v3.64.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/shim.git", - "reference": "7a91d5ce45c486f5b445d95901228507a02f60ae" + "reference": "81ccfd24baf3a10810dab1152c403981a790b837" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/7a91d5ce45c486f5b445d95901228507a02f60ae", - "reference": "7a91d5ce45c486f5b445d95901228507a02f60ae", + "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/81ccfd24baf3a10810dab1152c403981a790b837", + "reference": "81ccfd24baf3a10810dab1152c403981a790b837", "shasum": "" }, "require": { @@ -447,9 +494,9 @@ "description": "A tool to automatically fix PHP code style", "support": { "issues": "https://github.com/PHP-CS-Fixer/shim/issues", - "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.62.0" + "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.64.0" }, - "time": "2024-08-07T17:03:46+00:00" + "time": "2024-08-30T23:10:11+00:00" }, { "name": "phpunit/php-code-coverage", diff --git a/lib/Controller/AttachmentController.php b/lib/Controller/AttachmentController.php index 998ff7a3429..60eb25b06cb 100644 --- a/lib/Controller/AttachmentController.php +++ b/lib/Controller/AttachmentController.php @@ -62,7 +62,7 @@ public function __construct( private IL10N $l10n, private LoggerInterface $logger, private IMimeTypeDetector $mimeTypeDetector, - private AttachmentService $attachmentService + private AttachmentService $attachmentService, ) { parent::__construct($appName, $request); } diff --git a/lib/Controller/PublicSessionController.php b/lib/Controller/PublicSessionController.php index 4d4f76a7faf..03cc9c6db19 100644 --- a/lib/Controller/PublicSessionController.php +++ b/lib/Controller/PublicSessionController.php @@ -31,7 +31,7 @@ public function __construct( IRequest $request, ISession $session, private ShareManager $shareManager, - private ApiService $apiService + private ApiService $apiService, ) { parent::__construct($appName, $request, $session); } diff --git a/lib/Controller/SessionController.php b/lib/Controller/SessionController.php index 76f3d411b91..c243534ade7 100644 --- a/lib/Controller/SessionController.php +++ b/lib/Controller/SessionController.php @@ -36,7 +36,8 @@ public function __construct( private SessionService $sessionService, private NotificationService $notificationService, private IUserManager $userManager, - private IUserSession $userSession) { + private IUserSession $userSession, + ) { parent::__construct($appName, $request); } diff --git a/lib/Controller/SettingsController.php b/lib/Controller/SettingsController.php index 1c46b11e876..2a031a4b808 100644 --- a/lib/Controller/SettingsController.php +++ b/lib/Controller/SettingsController.php @@ -19,7 +19,12 @@ class SettingsController extends Controller { 'workspace_enabled' ]; - public function __construct(string $appName, IRequest $request, private IConfig $config, private ?string $userId) { + public function __construct( + string $appName, + IRequest $request, + private IConfig $config, + private ?string $userId, + ) { parent::__construct($appName, $request); } diff --git a/lib/Controller/UserApiController.php b/lib/Controller/UserApiController.php index 260a8b750fb..948111f6bf2 100644 --- a/lib/Controller/UserApiController.php +++ b/lib/Controller/UserApiController.php @@ -28,7 +28,7 @@ public function __construct( IRequest $request, private SessionService $sessionService, private ISearch $collaboratorSearch, - private IUserManager $userManager + private IUserManager $userManager, ) { parent::__construct($appName, $request); } diff --git a/lib/Controller/WorkspaceController.php b/lib/Controller/WorkspaceController.php index 6d3a7d9b7ce..0c58764c0c5 100644 --- a/lib/Controller/WorkspaceController.php +++ b/lib/Controller/WorkspaceController.php @@ -66,7 +66,7 @@ public function __construct( private IEventDispatcher $eventDispatcher, private LoggerInterface $logger, private ISession $session, - private ?string $userId + private ?string $userId, ) { parent::__construct($appName, $request); } @@ -173,9 +173,9 @@ public function direct(string $path): DataResponse { if ($folder instanceof Folder) { $file = $this->getFile($folder); if ($file === null) { - $token = $this->directEditingManager->create($path . '/'. $this->workspaceService->getSupportedFilenames()[0], Application::APP_NAME, TextDocumentCreator::CREATOR_ID); + $token = $this->directEditingManager->create($path . '/' . $this->workspaceService->getSupportedFilenames()[0], Application::APP_NAME, TextDocumentCreator::CREATOR_ID); } else { - $token = $this->directEditingManager->open($path . '/'. $file->getName(), Application::APP_NAME); + $token = $this->directEditingManager->open($path . '/' . $file->getName(), Application::APP_NAME); } return new DataResponse([ 'url' => $this->urlGenerator->linkToRouteAbsolute('files.DirectEditingView.edit', ['token' => $token]) diff --git a/lib/DAV/WorkspacePlugin.php b/lib/DAV/WorkspacePlugin.php index 2ca5f76a610..2afd69bb600 100644 --- a/lib/DAV/WorkspacePlugin.php +++ b/lib/DAV/WorkspacePlugin.php @@ -40,7 +40,7 @@ public function __construct( private ICacheFactory $cacheFactory, private IConfig $config, private LoggerInterface $logger, - private ?string $userId + private ?string $userId, ) { } diff --git a/lib/Listeners/BeforeNodeRenamedListener.php b/lib/Listeners/BeforeNodeRenamedListener.php index 9f56f7a77fe..8593c4d0cae 100644 --- a/lib/Listeners/BeforeNodeRenamedListener.php +++ b/lib/Listeners/BeforeNodeRenamedListener.php @@ -24,7 +24,8 @@ class BeforeNodeRenamedListener implements IEventListener { public function __construct( private readonly AttachmentService $attachmentService, private readonly DocumentService $documentService, - private readonly LoggerInterface $logger) { + private readonly LoggerInterface $logger, + ) { } public function handle(Event $event): void { diff --git a/lib/Listeners/BeforeNodeWrittenListener.php b/lib/Listeners/BeforeNodeWrittenListener.php index cb6645d14d5..b634a9f396c 100644 --- a/lib/Listeners/BeforeNodeWrittenListener.php +++ b/lib/Listeners/BeforeNodeWrittenListener.php @@ -23,7 +23,7 @@ class BeforeNodeWrittenListener implements IEventListener { public function __construct( private LoggerInterface $logger, - private DocumentService $documentService + private DocumentService $documentService, ) { } diff --git a/lib/Listeners/LoadEditorListener.php b/lib/Listeners/LoadEditorListener.php index 123b778fae8..9f4dd3365e0 100644 --- a/lib/Listeners/LoadEditorListener.php +++ b/lib/Listeners/LoadEditorListener.php @@ -22,7 +22,7 @@ class LoadEditorListener implements \OCP\EventDispatcher\IEventListener { public function __construct( private InitialStateProvider $initialStateProvider, - private IEventDispatcher $eventDispatcher + private IEventDispatcher $eventDispatcher, ) { } diff --git a/lib/Migration/ResetSessionsBeforeYjs.php b/lib/Migration/ResetSessionsBeforeYjs.php index 6fef416dc20..1c35729ad59 100644 --- a/lib/Migration/ResetSessionsBeforeYjs.php +++ b/lib/Migration/ResetSessionsBeforeYjs.php @@ -13,8 +13,10 @@ use OCP\Migration\IRepairStep; class ResetSessionsBeforeYjs implements IRepairStep { - public function __construct(private IAppConfig $config, - private DocumentService $documentService) { + public function __construct( + private IAppConfig $config, + private DocumentService $documentService, + ) { } /** diff --git a/lib/Service/AttachmentService.php b/lib/Service/AttachmentService.php index 68c9776e68f..de8ca42e362 100644 --- a/lib/Service/AttachmentService.php +++ b/lib/Service/AttachmentService.php @@ -32,12 +32,14 @@ use OCP\Util; class AttachmentService { - public function __construct(private IRootFolder $rootFolder, + public function __construct( + private IRootFolder $rootFolder, private ShareManager $shareManager, private IPreview $previewManager, private IMimeTypeDetector $mimeTypeDetector, private IURLGenerator $urlGenerator, - private IFilenameValidator $filenameValidator) { + private IFilenameValidator $filenameValidator, + ) { } /** @@ -101,7 +103,7 @@ private function getImageFileContent(string $imageFileName, File $textFile, bool * @throws NotPermittedException * @throws NoUserException */ - public function getMediaFile(int $documentId, string $mediaFileName, string $userId): File|null { + public function getMediaFile(int $documentId, string $mediaFileName, string $userId): ?File { $textFile = $this->getTextFile($documentId, $userId); return $this->getMediaFullFile($mediaFileName, $textFile); } @@ -114,7 +116,7 @@ public function getMediaFile(int $documentId, string $mediaFileName, string $use * @throws InvalidPathException * @throws NoUserException */ - public function getMediaFilePublic(int $documentId, string $mediaFileName, string $shareToken): File|null { + public function getMediaFilePublic(int $documentId, string $mediaFileName, string $shareToken): ?File { $textFile = $this->getTextFilePublic($documentId, $shareToken); return $this->getMediaFullFile($mediaFileName, $textFile); } diff --git a/lib/Service/DocumentService.php b/lib/Service/DocumentService.php index 2d5d3c808f5..dbeb24fc14d 100644 --- a/lib/Service/DocumentService.php +++ b/lib/Service/DocumentService.php @@ -146,7 +146,7 @@ public function createDocument(File $file): Document { try { /** @var Document $document */ $document = $this->documentMapper->insert($document); - $this->cache->set('document-version-'.$document->getId(), 0); + $this->cache->set('document-version-' . $document->getId(), 0); } catch (Exception $e) { if ($e->getReason() === Exception::REASON_UNIQUE_CONSTRAINT_VIOLATION) { // Document might have been created in the meantime diff --git a/lib/Service/InitialStateProvider.php b/lib/Service/InitialStateProvider.php index 3ab2dd4877e..c88ea4a1958 100644 --- a/lib/Service/InitialStateProvider.php +++ b/lib/Service/InitialStateProvider.php @@ -27,7 +27,7 @@ public function __construct( private ConfigService $configService, private ITranslationManager $translationManager, private IManager $taskProcessingManager, - private ?string $userId + private ?string $userId, ) { } diff --git a/lib/Service/SessionService.php b/lib/Service/SessionService.php index 1f7a46e274d..4a1fc70c263 100644 --- a/lib/Service/SessionService.php +++ b/lib/Service/SessionService.php @@ -45,7 +45,7 @@ public function __construct( IRequest $request, IManager $directManager, ?string $userId, - ICacheFactory $cacheFactory + ICacheFactory $cacheFactory, ) { $this->sessionMapper = $sessionMapper; $this->secureRandom = $secureRandom; diff --git a/lib/YjsMessage.php b/lib/YjsMessage.php index 1b9484faef8..24840930daa 100644 --- a/lib/YjsMessage.php +++ b/lib/YjsMessage.php @@ -35,7 +35,7 @@ class YjsMessage { private int $pos = 0; public function __construct( - private string $data = '' + private string $data = '', ) { }