diff options
author | Joas Schilling <coding@schilljs.com> | 2023-11-23 10:22:34 +0100 |
---|---|---|
committer | Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com> | 2023-11-23 10:36:13 +0100 |
commit | aa5f037af71c915424c6dcfd5ad2dc82797dc0d6 (patch) | |
tree | 843203cd1346158aab3515687e37a90e78c929e9 /lib/public | |
parent | 272719ed1cba6836ea0a597bb9767754eeb1e0d4 (diff) | |
download | nextcloud-server-aa5f037af71c915424c6dcfd5ad2dc82797dc0d6.tar.gz nextcloud-server-aa5f037af71c915424c6dcfd5ad2dc82797dc0d6.zip |
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Diffstat (limited to 'lib/public')
31 files changed, 74 insertions, 74 deletions
diff --git a/lib/public/AppFramework/ApiController.php b/lib/public/AppFramework/ApiController.php index 66c278e62d8..9505af0b2e2 100644 --- a/lib/public/AppFramework/ApiController.php +++ b/lib/public/AppFramework/ApiController.php @@ -52,10 +52,10 @@ abstract class ApiController extends Controller { * @since 7.0.0 */ public function __construct($appName, - IRequest $request, - $corsMethods = 'PUT, POST, GET, DELETE, PATCH', - $corsAllowedHeaders = 'Authorization, Content-Type, Accept', - $corsMaxAge = 1728000) { + IRequest $request, + $corsMethods = 'PUT, POST, GET, DELETE, PATCH', + $corsAllowedHeaders = 'Authorization, Content-Type, Accept', + $corsMaxAge = 1728000) { parent::__construct($appName, $request); $this->corsMethods = $corsMethods; $this->corsAllowedHeaders = $corsAllowedHeaders; diff --git a/lib/public/AppFramework/AuthPublicShareController.php b/lib/public/AppFramework/AuthPublicShareController.php index 78dd45551ed..847f1823db8 100644 --- a/lib/public/AppFramework/AuthPublicShareController.php +++ b/lib/public/AppFramework/AuthPublicShareController.php @@ -57,9 +57,9 @@ abstract class AuthPublicShareController extends PublicShareController { * @since 14.0.0 */ public function __construct(string $appName, - IRequest $request, - ISession $session, - IURLGenerator $urlGenerator) { + IRequest $request, + ISession $session, + IURLGenerator $urlGenerator) { parent::__construct($appName, $request, $session); $this->urlGenerator = $urlGenerator; diff --git a/lib/public/AppFramework/Bootstrap/IRegistrationContext.php b/lib/public/AppFramework/Bootstrap/IRegistrationContext.php index 3153b556a5c..b39c8591a7e 100644 --- a/lib/public/AppFramework/Bootstrap/IRegistrationContext.php +++ b/lib/public/AppFramework/Bootstrap/IRegistrationContext.php @@ -37,11 +37,11 @@ use OCP\Collaboration\Reference\IReferenceProvider; use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\Template\ICustomTemplateProvider; use OCP\IContainer; -use OCP\TextProcessing\IProvider as ITextProcessingProvider; -use OCP\TextToImage\IProvider as ITextToImageProvider; use OCP\Notification\INotifier; use OCP\Preview\IProviderV2; use OCP\SpeechToText\ISpeechToTextProvider; +use OCP\TextProcessing\IProvider as ITextProcessingProvider; +use OCP\TextToImage\IProvider as ITextToImageProvider; use OCP\Translation\ITranslationProvider; /** diff --git a/lib/public/AppFramework/Controller.php b/lib/public/AppFramework/Controller.php index e8500d5ae1a..12e1c31626b 100644 --- a/lib/public/AppFramework/Controller.php +++ b/lib/public/AppFramework/Controller.php @@ -65,7 +65,7 @@ abstract class Controller { * @since 6.0.0 - parameter $appName was added in 7.0.0 - parameter $app was removed in 7.0.0 */ public function __construct($appName, - IRequest $request) { + IRequest $request) { $this->appName = $appName; $this->request = $request; diff --git a/lib/public/AppFramework/Http/TooManyRequestsResponse.php b/lib/public/AppFramework/Http/TooManyRequestsResponse.php index 043ae0161e9..688fb6cc385 100644 --- a/lib/public/AppFramework/Http/TooManyRequestsResponse.php +++ b/lib/public/AppFramework/Http/TooManyRequestsResponse.php @@ -26,8 +26,8 @@ declare(strict_types=1); */ namespace OCP\AppFramework\Http; -use OCP\Template; use OCP\AppFramework\Http; +use OCP\Template; /** * A generic 429 response showing an 404 error page as well to the end-user diff --git a/lib/public/AppFramework/OCSController.php b/lib/public/AppFramework/OCSController.php index 51c71ad4e64..68c88915b1c 100644 --- a/lib/public/AppFramework/OCSController.php +++ b/lib/public/AppFramework/OCSController.php @@ -59,10 +59,10 @@ abstract class OCSController extends ApiController { * @since 8.1.0 */ public function __construct($appName, - IRequest $request, - $corsMethods = 'PUT, POST, GET, DELETE, PATCH', - $corsAllowedHeaders = 'Authorization, Content-Type, Accept, OCS-APIRequest', - $corsMaxAge = 1728000) { + IRequest $request, + $corsMethods = 'PUT, POST, GET, DELETE, PATCH', + $corsAllowedHeaders = 'Authorization, Content-Type, Accept, OCS-APIRequest', + $corsMaxAge = 1728000) { parent::__construct($appName, $request, $corsMethods, $corsAllowedHeaders, $corsMaxAge); $this->registerResponder('json', function ($data) { diff --git a/lib/public/AppFramework/PublicShareController.php b/lib/public/AppFramework/PublicShareController.php index 52acbe841b4..7c3725c9290 100644 --- a/lib/public/AppFramework/PublicShareController.php +++ b/lib/public/AppFramework/PublicShareController.php @@ -53,8 +53,8 @@ abstract class PublicShareController extends Controller { * @since 14.0.0 */ public function __construct(string $appName, - IRequest $request, - ISession $session) { + IRequest $request, + ISession $session) { parent::__construct($appName, $request); $this->session = $session; diff --git a/lib/public/Comments/ICommentsManager.php b/lib/public/Comments/ICommentsManager.php index 8d7ffd164b3..152c8deeaf3 100644 --- a/lib/public/Comments/ICommentsManager.php +++ b/lib/public/Comments/ICommentsManager.php @@ -114,11 +114,11 @@ interface ICommentsManager { * @since 9.0.0 */ public function getForObject( - $objectType, - $objectId, - $limit = 0, - $offset = 0, - \DateTime $notOlderThan = null + $objectType, + $objectId, + $limit = 0, + $offset = 0, + \DateTime $notOlderThan = null ); /** diff --git a/lib/public/Dashboard/Model/WidgetItem.php b/lib/public/Dashboard/Model/WidgetItem.php index 1c54d2bd426..22235053b5d 100644 --- a/lib/public/Dashboard/Model/WidgetItem.php +++ b/lib/public/Dashboard/Model/WidgetItem.php @@ -70,11 +70,11 @@ final class WidgetItem implements JsonSerializable { * @since 22.0.0 */ public function __construct(string $title = '', - string $subtitle = '', - string $link = '', - string $iconUrl = '', - string $sinceId = '', - string $overlayIconUrl = '') { + string $subtitle = '', + string $link = '', + string $iconUrl = '', + string $sinceId = '', + string $overlayIconUrl = '') { $this->title = $title; $this->subtitle = $subtitle; $this->iconUrl = $iconUrl; diff --git a/lib/public/Files/Events/FileCacheUpdated.php b/lib/public/Files/Events/FileCacheUpdated.php index 18d6318f2f4..2669c51088e 100644 --- a/lib/public/Files/Events/FileCacheUpdated.php +++ b/lib/public/Files/Events/FileCacheUpdated.php @@ -44,7 +44,7 @@ class FileCacheUpdated extends Event { * @since 18.0.0 */ public function __construct(IStorage $storage, - string $path) { + string $path) { parent::__construct(); $this->storage = $storage; $this->path = $path; diff --git a/lib/public/Files/Events/NodeAddedToCache.php b/lib/public/Files/Events/NodeAddedToCache.php index 6986b4b5989..3a1947e7a16 100644 --- a/lib/public/Files/Events/NodeAddedToCache.php +++ b/lib/public/Files/Events/NodeAddedToCache.php @@ -44,7 +44,7 @@ class NodeAddedToCache extends Event { * @since 18.0.0 */ public function __construct(IStorage $storage, - string $path) { + string $path) { parent::__construct(); $this->storage = $storage; $this->path = $path; diff --git a/lib/public/Files/Events/NodeRemovedFromCache.php b/lib/public/Files/Events/NodeRemovedFromCache.php index 9f67cb71371..83c4bd16531 100644 --- a/lib/public/Files/Events/NodeRemovedFromCache.php +++ b/lib/public/Files/Events/NodeRemovedFromCache.php @@ -44,7 +44,7 @@ class NodeRemovedFromCache extends Event { * @since 18.0.0 */ public function __construct(IStorage $storage, - string $path) { + string $path) { parent::__construct(); $this->storage = $storage; $this->path = $path; diff --git a/lib/public/Files/Node.php b/lib/public/Files/Node.php index b49b4a0f83d..ecf1427fa1a 100644 --- a/lib/public/Files/Node.php +++ b/lib/public/Files/Node.php @@ -30,8 +30,8 @@ namespace OCP\Files; -use OCP\Lock\LockedException; use OCP\Files\Storage\IStorage; +use OCP\Lock\LockedException; /** * Interface Node diff --git a/lib/public/Http/WellKnown/JrdResponse.php b/lib/public/Http/WellKnown/JrdResponse.php index 7a25f8fe0c3..077b58dc1d9 100644 --- a/lib/public/Http/WellKnown/JrdResponse.php +++ b/lib/public/Http/WellKnown/JrdResponse.php @@ -127,10 +127,10 @@ final class JrdResponse implements IResponse { * @since 21.0.0 */ public function addLink(string $rel, - ?string $type, - ?string $href, - ?array $titles = [], - ?array $properties = []): self { + ?string $type, + ?string $href, + ?array $titles = [], + ?array $properties = []): self { $this->links[] = array_filter([ 'rel' => $rel, 'type' => $type, diff --git a/lib/public/Log/Audit/CriticalActionPerformedEvent.php b/lib/public/Log/Audit/CriticalActionPerformedEvent.php index 79c67e5b8bd..45786a5c980 100644 --- a/lib/public/Log/Audit/CriticalActionPerformedEvent.php +++ b/lib/public/Log/Audit/CriticalActionPerformedEvent.php @@ -49,8 +49,8 @@ class CriticalActionPerformedEvent extends Event { * @since 22.0.0 */ public function __construct(string $logMessage, - array $parameters = [], - bool $obfuscateParameters = false) { + array $parameters = [], + bool $obfuscateParameters = false) { parent::__construct(); $this->logMessage = $logMessage; $this->parameters = $parameters; diff --git a/lib/public/Search/SearchResult.php b/lib/public/Search/SearchResult.php index 9ac8b28fb8b..892c60777b3 100644 --- a/lib/public/Search/SearchResult.php +++ b/lib/public/Search/SearchResult.php @@ -54,9 +54,9 @@ final class SearchResult implements JsonSerializable { * @since 20.0.0 */ private function __construct(string $name, - bool $isPaginated, - array $entries, - $cursor = null) { + bool $isPaginated, + array $entries, + $cursor = null) { $this->name = $name; $this->isPaginated = $isPaginated; $this->entries = $entries; @@ -87,8 +87,8 @@ final class SearchResult implements JsonSerializable { * @since 20.0.0 */ public static function paginated(string $name, - array $entries, - $cursor): self { + array $entries, + $cursor): self { return new self( $name, true, diff --git a/lib/public/Search/SearchResultEntry.php b/lib/public/Search/SearchResultEntry.php index 86a3f08cfe6..f4ff1ec2a5c 100644 --- a/lib/public/Search/SearchResultEntry.php +++ b/lib/public/Search/SearchResultEntry.php @@ -98,11 +98,11 @@ class SearchResultEntry implements JsonSerializable { * @since 20.0.0 */ public function __construct(string $thumbnailUrl, - string $title, - string $subline, - string $resourceUrl, - string $icon = '', - bool $rounded = false) { + string $title, + string $subline, + string $resourceUrl, + string $icon = '', + bool $rounded = false) { $this->thumbnailUrl = $thumbnailUrl; $this->title = $title; $this->subline = $subline; diff --git a/lib/public/Security/ISecureRandom.php b/lib/public/Security/ISecureRandom.php index 3634ebf99f7..48013b2cca7 100644 --- a/lib/public/Security/ISecureRandom.php +++ b/lib/public/Security/ISecureRandom.php @@ -64,5 +64,5 @@ interface ISecureRandom { * @since 8.0.0 */ public function generate(int $length, - string $characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'): string; + string $characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'): string; } diff --git a/lib/public/Security/RateLimiting/ILimiter.php b/lib/public/Security/RateLimiting/ILimiter.php index 275746b0b49..cfc7387664d 100644 --- a/lib/public/Security/RateLimiting/ILimiter.php +++ b/lib/public/Security/RateLimiting/ILimiter.php @@ -50,9 +50,9 @@ interface ILimiter { * */ public function registerAnonRequest(string $identifier, - int $anonLimit, - int $anonPeriod, - string $ip): void; + int $anonLimit, + int $anonPeriod, + string $ip): void; /** * Registers attempt for an authenticated request @@ -66,7 +66,7 @@ interface ILimiter { * */ public function registerUserRequest(string $identifier, - int $userLimit, - int $userPeriod, - IUser $user): void; + int $userLimit, + int $userPeriod, + IUser $user): void; } diff --git a/lib/public/Share.php b/lib/public/Share.php index 9499cdb14b6..225f252c2a9 100644 --- a/lib/public/Share.php +++ b/lib/public/Share.php @@ -116,7 +116,7 @@ class Share extends \OC\Share\Constants { * * defacto $parameters and $format is always the default and therefore is removed in the subsequent call */ public static function getItemShared($itemType, $itemSource, $format = self::FORMAT_NONE, - $parameters = null, $includeCollections = false) { + $parameters = null, $includeCollections = false) { return \OC\Share\Share::getItemShared($itemType, $itemSource, self::FORMAT_NONE, null, $includeCollections); } diff --git a/lib/public/Share/Events/VerifyMountPointEvent.php b/lib/public/Share/Events/VerifyMountPointEvent.php index 650f4ad2245..af71314930b 100644 --- a/lib/public/Share/Events/VerifyMountPointEvent.php +++ b/lib/public/Share/Events/VerifyMountPointEvent.php @@ -44,8 +44,8 @@ class VerifyMountPointEvent extends Event { * @since 19.0.0 */ public function __construct(IShare $share, - View $view, - string $parent) { + View $view, + string $parent) { parent::__construct(); $this->share = $share; diff --git a/lib/public/Share/IShareProvider.php b/lib/public/Share/IShareProvider.php index b6e0c4ba38b..2a37508d449 100644 --- a/lib/public/Share/IShareProvider.php +++ b/lib/public/Share/IShareProvider.php @@ -70,7 +70,7 @@ interface IShareProvider { * @return IShare The share object * @since 17.0.0 */ -// public function acceptShare(IShare $share, string $recipient): IShare; + // public function acceptShare(IShare $share, string $recipient): IShare; /** * Delete a share diff --git a/lib/public/Talk/IBroker.php b/lib/public/Talk/IBroker.php index d3b6e1429e6..f2b512ea4a8 100644 --- a/lib/public/Talk/IBroker.php +++ b/lib/public/Talk/IBroker.php @@ -68,8 +68,8 @@ interface IBroker { * @since 24.0.0 */ public function createConversation(string $name, - array $moderators, - IConversationOptions $options = null): IConversation; + array $moderators, + IConversationOptions $options = null): IConversation; /** * Delete a conversation by id diff --git a/lib/public/Talk/ITalkBackend.php b/lib/public/Talk/ITalkBackend.php index 3ee995576a4..a2f4d962019 100644 --- a/lib/public/Talk/ITalkBackend.php +++ b/lib/public/Talk/ITalkBackend.php @@ -46,8 +46,8 @@ interface ITalkBackend { * @since 24.0.0 */ public function createConversation(string $name, - array $moderators, - IConversationOptions $options): IConversation; + array $moderators, + IConversationOptions $options): IConversation; /** * Delete a conversation by id diff --git a/lib/public/User/Events/BeforePasswordUpdatedEvent.php b/lib/public/User/Events/BeforePasswordUpdatedEvent.php index 11eb5ad9dd0..ee228ae01e7 100644 --- a/lib/public/User/Events/BeforePasswordUpdatedEvent.php +++ b/lib/public/User/Events/BeforePasswordUpdatedEvent.php @@ -51,8 +51,8 @@ class BeforePasswordUpdatedEvent extends Event { * @since 18.0.0 */ public function __construct(IUser $user, - string $password, - string $recoveryPassword = null) { + string $password, + string $recoveryPassword = null) { parent::__construct(); $this->user = $user; $this->password = $password; diff --git a/lib/public/User/Events/BeforeUserCreatedEvent.php b/lib/public/User/Events/BeforeUserCreatedEvent.php index 67e9177b34d..ee33239a12c 100644 --- a/lib/public/User/Events/BeforeUserCreatedEvent.php +++ b/lib/public/User/Events/BeforeUserCreatedEvent.php @@ -44,7 +44,7 @@ class BeforeUserCreatedEvent extends Event { * @since 18.0.0 */ public function __construct(string $uid, - string $password) { + string $password) { parent::__construct(); $this->uid = $uid; $this->password = $password; diff --git a/lib/public/User/Events/PasswordUpdatedEvent.php b/lib/public/User/Events/PasswordUpdatedEvent.php index 41d510553b5..782d6d270ea 100644 --- a/lib/public/User/Events/PasswordUpdatedEvent.php +++ b/lib/public/User/Events/PasswordUpdatedEvent.php @@ -51,8 +51,8 @@ class PasswordUpdatedEvent extends Event { * @since 18.0.0 */ public function __construct(IUser $user, - string $password, - string $recoveryPassword = null) { + string $password, + string $recoveryPassword = null) { parent::__construct(); $this->user = $user; $this->password = $password; diff --git a/lib/public/User/Events/UserChangedEvent.php b/lib/public/User/Events/UserChangedEvent.php index f48dd3914e6..870b0326920 100644 --- a/lib/public/User/Events/UserChangedEvent.php +++ b/lib/public/User/Events/UserChangedEvent.php @@ -43,9 +43,9 @@ class UserChangedEvent extends Event { * @since 18.0.0 */ public function __construct(IUser $user, - string $feature, - $value, - $oldValue = null) { + string $feature, + $value, + $oldValue = null) { parent::__construct(); $this->user = $user; $this->feature = $feature; diff --git a/lib/public/User/Events/UserCreatedEvent.php b/lib/public/User/Events/UserCreatedEvent.php index 7d343bfd5b8..b0a734be0cb 100644 --- a/lib/public/User/Events/UserCreatedEvent.php +++ b/lib/public/User/Events/UserCreatedEvent.php @@ -45,7 +45,7 @@ class UserCreatedEvent extends Event { * @since 18.0.0 */ public function __construct(IUser $user, - string $password) { + string $password) { parent::__construct(); $this->user = $user; $this->password = $password; diff --git a/lib/public/User/Events/UserLiveStatusEvent.php b/lib/public/User/Events/UserLiveStatusEvent.php index d04c3b61e24..8b6207d685d 100644 --- a/lib/public/User/Events/UserLiveStatusEvent.php +++ b/lib/public/User/Events/UserLiveStatusEvent.php @@ -60,8 +60,8 @@ class UserLiveStatusEvent extends Event { * @since 20.0.0 */ public function __construct(IUser $user, - string $status, - int $timestamp) { + string $status, + int $timestamp) { parent::__construct(); $this->user = $user; $this->status = $status; diff --git a/lib/public/Util.php b/lib/public/Util.php index cabb84c0cf6..488eddbaf4b 100644 --- a/lib/public/Util.php +++ b/lib/public/Util.php @@ -46,9 +46,9 @@ namespace OCP; +use bantu\IniGetWrapper\IniGetWrapper; use OC\AppScriptDependency; use OC\AppScriptSort; -use bantu\IniGetWrapper\IniGetWrapper; use OCP\Share\IManager; use Psr\Container\ContainerExceptionInterface; |