diff options
Diffstat (limited to 'apps/dav/lib')
41 files changed, 106 insertions, 106 deletions
diff --git a/apps/dav/lib/AppInfo/Application.php b/apps/dav/lib/AppInfo/Application.php index 7cee070c6d1..64a1f738a70 100644 --- a/apps/dav/lib/AppInfo/Application.php +++ b/apps/dav/lib/AppInfo/Application.php @@ -65,7 +65,7 @@ class Application extends App { $container = $this->getContainer(); $server = $container->getServer(); - $container->registerService(PhotoCache::class, function(SimpleContainer $s) use ($server) { + $container->registerService(PhotoCache::class, function (SimpleContainer $s) use ($server) { return new PhotoCache( $server->getAppDataDir('dav-photocache'), $server->getLogger() @@ -147,7 +147,7 @@ class Application extends App { } }); - $clearPhotoCache = function($event) { + $clearPhotoCache = function ($event) { if ($event instanceof GenericEvent) { /** @var PhotoCache $p */ $p = $this->getContainer()->query(PhotoCache::class); @@ -160,20 +160,20 @@ class Application extends App { $dispatcher->addListener('\OCA\DAV\CardDAV\CardDavBackend::updateCard', $clearPhotoCache); $dispatcher->addListener('\OCA\DAV\CardDAV\CardDavBackend::deleteCard', $clearPhotoCache); - $dispatcher->addListener('OC\AccountManager::userUpdated', function(GenericEvent $event) { + $dispatcher->addListener('OC\AccountManager::userUpdated', function (GenericEvent $event) { $user = $event->getSubject(); $syncService = $this->getContainer()->query(SyncService::class); $syncService->updateUser($user); }); - $dispatcher->addListener('\OCA\DAV\CalDAV\CalDavBackend::createCalendar', function(GenericEvent $event) { + $dispatcher->addListener('\OCA\DAV\CalDAV\CalDavBackend::createCalendar', function (GenericEvent $event) { /** @var Backend $backend */ $backend = $this->getContainer()->query(Backend::class); $backend->onCalendarAdd( $event->getArgument('calendarData') ); }); - $dispatcher->addListener('\OCA\DAV\CalDAV\CalDavBackend::updateCalendar', function(GenericEvent $event) { + $dispatcher->addListener('\OCA\DAV\CalDAV\CalDavBackend::updateCalendar', function (GenericEvent $event) { /** @var Backend $backend */ $backend = $this->getContainer()->query(Backend::class); $backend->onCalendarUpdate( @@ -182,7 +182,7 @@ class Application extends App { $event->getArgument('propertyMutations') ); }); - $dispatcher->addListener('\OCA\DAV\CalDAV\CalDavBackend::deleteCalendar', function(GenericEvent $event) { + $dispatcher->addListener('\OCA\DAV\CalDAV\CalDavBackend::deleteCalendar', function (GenericEvent $event) { /** @var Backend $backend */ $backend = $this->getContainer()->query(Backend::class); $backend->onCalendarDelete( @@ -195,7 +195,7 @@ class Application extends App { $event->getArgument('calendarId') ); }); - $dispatcher->addListener('\OCA\DAV\CalDAV\CalDavBackend::updateShares', function(GenericEvent $event) { + $dispatcher->addListener('\OCA\DAV\CalDAV\CalDavBackend::updateShares', function (GenericEvent $event) { /** @var Backend $backend */ $backend = $this->getContainer()->query(Backend::class); $backend->onCalendarUpdateShares( @@ -208,7 +208,7 @@ class Application extends App { // Here we should recalculate if reminders should be sent to new or old sharees }); - $dispatcher->addListener('\OCA\DAV\CalDAV\CalDavBackend::publishCalendar', function(GenericEvent $event) { + $dispatcher->addListener('\OCA\DAV\CalDAV\CalDavBackend::publishCalendar', function (GenericEvent $event) { /** @var Backend $backend */ $backend = $this->getContainer()->query(Backend::class); $backend->onCalendarPublication( @@ -217,7 +217,7 @@ class Application extends App { ); }); - $listener = function(GenericEvent $event, $eventName) { + $listener = function (GenericEvent $event, $eventName) { /** @var Backend $backend */ $backend = $this->getContainer()->query(Backend::class); diff --git a/apps/dav/lib/AppInfo/PluginManager.php b/apps/dav/lib/AppInfo/PluginManager.php index db54e057498..21ff40ba6b8 100644 --- a/apps/dav/lib/AppInfo/PluginManager.php +++ b/apps/dav/lib/AppInfo/PluginManager.php @@ -272,7 +272,7 @@ class PluginManager { * @param string[] $plugin */ private function loadSabreAddressBookPluginsFromInfoXml(array $plugins): void { - $providers = array_map(function(string $className): IAddressBookProvider { + $providers = array_map(function (string $className): IAddressBookProvider { $instance = $this->createPluginInstance($className); if (!($instance instanceof IAddressBookProvider)) { throw new \Exception("Sabre address book plugin class '$className' does not implement the \OCA\DAV\CardDAV\Integration\IAddressBookProvider interface"); diff --git a/apps/dav/lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php b/apps/dav/lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php index 93d3091042f..8396bfb9a5a 100644 --- a/apps/dav/lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php +++ b/apps/dav/lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php @@ -57,7 +57,7 @@ class RegisterRegenerateBirthdayCalendars extends QueuedJob { * @inheritDoc */ public function run($argument) { - $this->userManager->callForSeenUsers(function(IUser $user) { + $this->userManager->callForSeenUsers(function (IUser $user) { $this->jobList->add(GenerateBirthdayCalendarBackgroundJob::class, [ 'userId' => $user->getUID(), 'purgeBeforeGenerating' => true diff --git a/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php b/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php index 75a36823620..7fe107e0004 100644 --- a/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php +++ b/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php @@ -398,7 +398,7 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob { ->where($query->expr()->eq('backend_id', $query->createNamedParameter($backendId))); $stmt = $query->execute(); - return array_map(function($row) { + return array_map(function ($row) { return $row['resource_id']; }, $stmt->fetchAll(\PDO::FETCH_NAMED)); } diff --git a/apps/dav/lib/BackgroundJob/UploadCleanup.php b/apps/dav/lib/BackgroundJob/UploadCleanup.php index cd88ed4ab1e..f5863ddeafe 100644 --- a/apps/dav/lib/BackgroundJob/UploadCleanup.php +++ b/apps/dav/lib/BackgroundJob/UploadCleanup.php @@ -77,7 +77,7 @@ class UploadCleanup extends TimedJob { // The folder has to be more than a day old $initial = $uploadFolder->getMTime() < $time; - $expire = array_reduce($files, function(bool $carry, File $file) use ($time) { + $expire = array_reduce($files, function (bool $carry, File $file) use ($time) { return $carry && $file->getMTime() < $time; }, $initial); diff --git a/apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php b/apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php index 0e6436a7b09..a1ebd409f0e 100644 --- a/apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php +++ b/apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php @@ -87,7 +87,7 @@ class EnablePlugin extends ServerPlugin { * * @return string */ - public function getPluginName() { + public function getPluginName() { return 'nc-enable-birthday-calendar'; } diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index cf06cb5ab25..f947ea9d01e 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -308,7 +308,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription $principals = $this->principalBackend->getGroupMembership($principalUriOriginal, true); $principals = array_merge($principals, $this->principalBackend->getCircleMembership($principalUriOriginal)); - $principals = array_map(function($principal) { + $principals = array_map(function ($principal) { return urldecode($principal); }, $principals); $principals[]= $principalUri; @@ -800,7 +800,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription /** * @suppress SqlInjectionChecker */ - $propPatch->handle($supportedProperties, function($mutations) use ($calendarId) { + $propPatch->handle($supportedProperties, function ($mutations) use ($calendarId) { $newValues = []; foreach ($mutations as $propertyName => $propertyValue) { @@ -1587,7 +1587,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription $result = $outerQuery->execute(); $calendarObjects = $result->fetchAll(); - return array_map(function($o) { + return array_map(function ($o) { $calendarData = Reader::read($o['calendardata']); $comps = $calendarData->getComponents(); $objects = []; @@ -1605,10 +1605,10 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription 'type' => $o['componenttype'], 'uid' => $o['uid'], 'uri' => $o['uri'], - 'objects' => array_map(function($c) { + 'objects' => array_map(function ($c) { return $this->transformSearchData($c); }, $objects), - 'timezones' => array_map(function($c) { + 'timezones' => array_map(function ($c) { return $this->transformSearchData($c); }, $timezones), ]; @@ -1624,7 +1624,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription /** @var Component[] $subComponents */ $subComponents = $comp->getComponents(); /** @var Property[] $properties */ - $properties = array_filter($comp->children(), function($c) { + $properties = array_filter($comp->children(), function ($c) { return $c instanceof Property; }); $validationRules = $comp->getValidationRules(); @@ -1993,7 +1993,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription /** * @suppress SqlInjectionChecker */ - $propPatch->handle($supportedProperties, function($mutations) use ($subscriptionId) { + $propPatch->handle($supportedProperties, function ($mutations) use ($subscriptionId) { $newValues = []; diff --git a/apps/dav/lib/CalDAV/Calendar.php b/apps/dav/lib/CalDAV/Calendar.php index 38598e30ce3..1c7e0106fb6 100644 --- a/apps/dav/lib/CalDAV/Calendar.php +++ b/apps/dav/lib/CalDAV/Calendar.php @@ -225,7 +225,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable { parent::getOwner(), 'principals/system/public' ]; - return array_filter($acl, function($rule) use ($allowedPrincipals) { + return array_filter($acl, function ($rule) use ($allowedPrincipals) { return \in_array($rule['principal'], $allowedPrincipals, true); }); } @@ -246,7 +246,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable { $this->calendarInfo['{http://owncloud.org/ns}owner-principal'] !== $this->calendarInfo['principaluri']) { $principal = 'principal:' . parent::getOwner(); $shares = $this->caldavBackend->getShares($this->getResourceId()); - $shares = array_filter($shares, function($share) use ($principal){ + $shares = array_filter($shares, function ($share) use ($principal) { return $share['href'] === $principal; }); if (empty($shares)) { diff --git a/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php b/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php index 28e96e9b1d5..59b97312062 100644 --- a/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php +++ b/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php @@ -95,7 +95,7 @@ class PublishPlugin extends ServerPlugin { * * @return string */ - public function getPluginName() { + public function getPluginName() { return 'oc-calendar-publishing'; } @@ -128,7 +128,7 @@ class PublishPlugin extends ServerPlugin { } }); - $propFind->handle('{'.self::NS_CALENDARSERVER.'}allowed-sharing-modes', function() use ($node) { + $propFind->handle('{'.self::NS_CALENDARSERVER.'}allowed-sharing-modes', function () use ($node) { $canShare = (!$node->isSubscription() && $node->canWrite()); $canPublish = (!$node->isSubscription() && $node->canWrite()); diff --git a/apps/dav/lib/CalDAV/Reminder/ReminderService.php b/apps/dav/lib/CalDAV/Reminder/ReminderService.php index fe4153fccf0..39fe4b248cb 100644 --- a/apps/dav/lib/CalDAV/Reminder/ReminderService.php +++ b/apps/dav/lib/CalDAV/Reminder/ReminderService.php @@ -727,7 +727,7 @@ class ReminderService { * @return VObject\Component\VEvent[] */ private function getRecurrenceExceptionFromListOfVEvents(array $vevents):array { - return array_values(array_filter($vevents, function(VEvent $vevent) { + return array_values(array_filter($vevents, function (VEvent $vevent) { return $vevent->{'RECURRENCE-ID'} !== null; })); } @@ -737,7 +737,7 @@ class ReminderService { * @return VEvent|null */ private function getMasterItemFromListOfVEvents(array $vevents):?VEvent { - $elements = array_values(array_filter($vevents, function(VEvent $vevent) { + $elements = array_values(array_filter($vevents, function (VEvent $vevent) { return $vevent->{'RECURRENCE-ID'} === null; })); diff --git a/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php b/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php index 5a25fbaa22e..96b4371bd7c 100644 --- a/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php +++ b/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php @@ -305,11 +305,11 @@ abstract class AbstractPrincipalBackend implements BackendInterface { default: $rowsByMetadata = $this->searchPrincipalsByMetadataKey($prop, $value); - $filteredRows = array_filter($rowsByMetadata, function($row) use ($usersGroups) { + $filteredRows = array_filter($rowsByMetadata, function ($row) use ($usersGroups) { return $this->isAllowedToAccessResource($row, $usersGroups); }); - $results[] = array_map(function($row) { + $results[] = array_map(function ($row) { return $row['uri']; }, $filteredRows); diff --git a/apps/dav/lib/CalDAV/Schedule/Plugin.php b/apps/dav/lib/CalDAV/Schedule/Plugin.php index 55a7b3ee691..7ad4a3904ed 100644 --- a/apps/dav/lib/CalDAV/Schedule/Plugin.php +++ b/apps/dav/lib/CalDAV/Schedule/Plugin.php @@ -261,7 +261,7 @@ EOF; */ function propFindDefaultCalendarUrl(PropFind $propFind, INode $node) { if ($node instanceof IPrincipal) { - $propFind->handle('{' . self::NS_CALDAV . '}schedule-default-calendar-URL', function() use ($node) { + $propFind->handle('{' . self::NS_CALDAV . '}schedule-default-calendar-URL', function () use ($node) { /** @var \OCA\DAV\CalDAV\Plugin $caldavPlugin */ $caldavPlugin = $this->server->getPlugin('caldav'); $principalUrl = $node->getPrincipalUrl(); diff --git a/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php b/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php index d25018c1298..d00e0886b61 100644 --- a/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php +++ b/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php @@ -166,7 +166,7 @@ class RefreshWebcalService { public function getSubscription(string $principalUri, string $uri) { $subscriptions = array_values(array_filter( $this->calDavBackend->getSubscriptionsForUser($principalUri), - function($sub) use ($uri) { + function ($sub) use ($uri) { return $sub['uri'] === $uri; } )); @@ -197,7 +197,7 @@ class RefreshWebcalService { ->withHeader('Accept', 'text/calendar, application/calendar+json, application/calendar+xml') ->withHeader('User-Agent', 'Nextcloud Webcal Crawler'); })); - $handlerStack->push(Middleware::mapResponse(function(ResponseInterface $response) use (&$didBreak301Chain, &$latestLocation) { + $handlerStack->push(Middleware::mapResponse(function (ResponseInterface $response) use (&$didBreak301Chain, &$latestLocation) { if (!$didBreak301Chain) { if ($response->getStatusCode() !== 301) { $didBreak301Chain = true; diff --git a/apps/dav/lib/CardDAV/AddressBook.php b/apps/dav/lib/CardDAV/AddressBook.php index 4fc97ac401f..010e98d18e7 100644 --- a/apps/dav/lib/CardDAV/AddressBook.php +++ b/apps/dav/lib/CardDAV/AddressBook.php @@ -145,7 +145,7 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable { $acl = $this->carddavBackend->applyShareAcl($this->getResourceId(), $acl); $allowedPrincipals = [$this->getOwner(), parent::getOwner(), 'principals/system/system']; - return array_filter($acl, function($rule) use ($allowedPrincipals) { + return array_filter($acl, function ($rule) use ($allowedPrincipals) { return \in_array($rule['principal'], $allowedPrincipals, true); }); } @@ -183,7 +183,7 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable { if (isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) { $principal = 'principal:' . parent::getOwner(); $shares = $this->carddavBackend->getShares($this->getResourceId()); - $shares = array_filter($shares, function($share) use ($principal){ + $shares = array_filter($shares, function ($share) use ($principal) { return $share['href'] === $principal; }); if (empty($shares)) { diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php index ee9f723be6b..1f44b63a575 100644 --- a/apps/dav/lib/CardDAV/CardDavBackend.php +++ b/apps/dav/lib/CardDAV/CardDavBackend.php @@ -174,7 +174,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { $principals = $this->principalBackend->getGroupMembership($principalUriOriginal, true); $principals = array_merge($principals, $this->principalBackend->getCircleMembership($principalUriOriginal)); - $principals = array_map(function($principal) { + $principals = array_map(function ($principal) { return urldecode($principal); }, $principals); $principals[]= $principalUri; @@ -363,7 +363,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { /** * @suppress SqlInjectionChecker */ - $propPatch->handle($supportedProperties, function($mutations) use ($addressBookId) { + $propPatch->handle($supportedProperties, function ($mutations) use ($addressBookId) { $updates = []; foreach($mutations as $property=>$newValue) { @@ -939,7 +939,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { $result->closeCursor(); - return array_map(function($array) { + return array_map(function ($array) { $array['carddata'] = $this->readBlob($array['carddata']); return $array; }, $cards); diff --git a/apps/dav/lib/CardDAV/SyncService.php b/apps/dav/lib/CardDAV/SyncService.php index d163565a7a2..c0241de2076 100644 --- a/apps/dav/lib/CardDAV/SyncService.php +++ b/apps/dav/lib/CardDAV/SyncService.php @@ -322,7 +322,7 @@ class SyncService { public function syncInstance(\Closure $progressCallback = null) { $systemAddressBook = $this->getLocalSystemAddressBook(); - $this->userManager->callForSeenUsers(function($user) use ($systemAddressBook, $progressCallback) { + $this->userManager->callForSeenUsers(function ($user) use ($systemAddressBook, $progressCallback) { $this->updateUser($user); if (!is_null($progressCallback)) { $progressCallback(); diff --git a/apps/dav/lib/CardDAV/UserAddressBooks.php b/apps/dav/lib/CardDAV/UserAddressBooks.php index 4b4ec4e12e9..7ebe3b03d11 100644 --- a/apps/dav/lib/CardDAV/UserAddressBooks.php +++ b/apps/dav/lib/CardDAV/UserAddressBooks.php @@ -72,7 +72,7 @@ class UserAddressBooks extends \Sabre\CardDAV\AddressBookHome { $addressBooks = $this->carddavBackend->getAddressBooksForUser($this->principalUri); /** @var IAddressBook[] $objects */ - $objects = array_map(function(array $addressBook) { + $objects = array_map(function (array $addressBook) { if ($addressBook['principaluri'] === 'principals/system/system') { return new SystemAddressbook($this->carddavBackend, $addressBook, $this->l10n, $this->config); } @@ -80,7 +80,7 @@ class UserAddressBooks extends \Sabre\CardDAV\AddressBookHome { return new AddressBook($this->carddavBackend, $addressBook, $this->l10n); }, $addressBooks); /** @var IAddressBook[][] $objectsFromPlugins */ - $objectsFromPlugins = array_map(function(IAddressBookProvider $plugin): array { + $objectsFromPlugins = array_map(function (IAddressBookProvider $plugin): array { return $plugin->fetchAllForAddressBookHome($this->principalUri); }, $this->pluginManager->getAddressBookPlugins()); diff --git a/apps/dav/lib/Command/SyncBirthdayCalendar.php b/apps/dav/lib/Command/SyncBirthdayCalendar.php index f11c5784d55..211df745e41 100644 --- a/apps/dav/lib/Command/SyncBirthdayCalendar.php +++ b/apps/dav/lib/Command/SyncBirthdayCalendar.php @@ -96,7 +96,7 @@ class SyncBirthdayCalendar extends Command { $output->writeln("Start birthday calendar sync for all users ..."); $p = new ProgressBar($output); $p->start(); - $this->userManager->callForSeenUsers(function($user) use ($p) { + $this->userManager->callForSeenUsers(function ($user) use ($p) { $p->advance(); $userId = $user->getUID(); @@ -113,7 +113,7 @@ class SyncBirthdayCalendar extends Command { $output->writeln(''); } - protected function verifyEnabled () { + protected function verifyEnabled() { $isEnabled = $this->config->getAppValue('dav', 'generateBirthdayCalendar', 'yes'); if ($isEnabled !== 'yes') { diff --git a/apps/dav/lib/Command/SyncSystemAddressBook.php b/apps/dav/lib/Command/SyncSystemAddressBook.php index 1729ab8f382..f707e733add 100644 --- a/apps/dav/lib/Command/SyncSystemAddressBook.php +++ b/apps/dav/lib/Command/SyncSystemAddressBook.php @@ -56,7 +56,7 @@ class SyncSystemAddressBook extends Command { $output->writeln('Syncing users ...'); $progress = new ProgressBar($output); $progress->start(); - $this->syncService->syncInstance(function() use ($progress) { + $this->syncService->syncInstance(function () use ($progress) { $progress->advance(); }); diff --git a/apps/dav/lib/Comments/CommentNode.php b/apps/dav/lib/Comments/CommentNode.php index a8e4c2885b4..d54f81b7a8e 100644 --- a/apps/dav/lib/Comments/CommentNode.php +++ b/apps/dav/lib/Comments/CommentNode.php @@ -85,7 +85,7 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties { $this->logger = $logger; $methods = get_class_methods($this->comment); - $methods = array_filter($methods, function($name){ + $methods = array_filter($methods, function ($name) { return strpos($name, 'get') === 0; }); foreach($methods as $getter) { @@ -283,7 +283,7 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties { * @return array */ protected function composeMentionsPropertyValue() { - return array_map(function($mention) { + return array_map(function ($mention) { try { $displayName = $this->commentsManager->resolveDisplayName($mention['type'], $mention['id']); } catch (\OutOfBoundsException $e) { diff --git a/apps/dav/lib/Comments/CommentsPlugin.php b/apps/dav/lib/Comments/CommentsPlugin.php index 5fc8666de05..55b0bdd4b40 100644 --- a/apps/dav/lib/Comments/CommentsPlugin.php +++ b/apps/dav/lib/Comments/CommentsPlugin.php @@ -91,7 +91,7 @@ class CommentsPlugin extends ServerPlugin { $this->server->xml->namespaceMap[self::NS_OWNCLOUD] = 'oc'; - $this->server->xml->classMap['DateTime'] = function(Writer $writer, \DateTime $value) { + $this->server->xml->classMap['DateTime'] = function (Writer $writer, \DateTime $value) { $writer->write(\Sabre\HTTP\toDate($value)); }; diff --git a/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php b/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php index a479d0ff965..51d453e3f2a 100644 --- a/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php @@ -99,15 +99,15 @@ class CommentPropertiesPlugin extends ServerPlugin { } } - $propFind->handle(self::PROPERTY_NAME_COUNT, function() use ($node) { + $propFind->handle(self::PROPERTY_NAME_COUNT, function () use ($node) { return $this->commentsManager->getNumberOfCommentsForObject('files', (string)$node->getId()); }); - $propFind->handle(self::PROPERTY_NAME_HREF, function() use ($node) { + $propFind->handle(self::PROPERTY_NAME_HREF, function () use ($node) { return $this->getCommentsLink($node); }); - $propFind->handle(self::PROPERTY_NAME_UNREAD, function() use ($node) { + $propFind->handle(self::PROPERTY_NAME_UNREAD, function () use ($node) { if (isset($this->cachedUnreadCount[$node->getId()])) { return $this->cachedUnreadCount[$node->getId()]; } else { diff --git a/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php b/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php index 7f1a735c7a4..62c9915cc4e 100644 --- a/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php @@ -89,10 +89,10 @@ class FakeLockerPlugin extends ServerPlugin { * @return void */ function propFind(PropFind $propFind, INode $node) { - $propFind->handle('{DAV:}supportedlock', function() { + $propFind->handle('{DAV:}supportedlock', function () { return new SupportedLock(true); }); - $propFind->handle('{DAV:}lockdiscovery', function() use ($propFind) { + $propFind->handle('{DAV:}lockdiscovery', function () use ($propFind) { return new LockDiscovery([]); }); } diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php index 8f94ea9a52e..890e65a7fa5 100644 --- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php @@ -180,7 +180,7 @@ class FilesPlugin extends ServerPlugin { $this->server->on('afterWriteContent', [$this, 'sendFileIdHeader']); $this->server->on('afterMethod:GET', [$this,'httpGet']); $this->server->on('afterMethod:GET', [$this, 'handleDownloadToken']); - $this->server->on('afterResponse', function($request, ResponseInterface $response) { + $this->server->on('afterResponse', function ($request, ResponseInterface $response) { $body = $response->getBody(); if (is_resource($body)) { fclose($body); @@ -305,15 +305,15 @@ class FilesPlugin extends ServerPlugin { * } */ - $propFind->handle(self::FILEID_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::FILEID_PROPERTYNAME, function () use ($node) { return $node->getFileId(); }); - $propFind->handle(self::INTERNAL_FILEID_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::INTERNAL_FILEID_PROPERTYNAME, function () use ($node) { return $node->getInternalFileId(); }); - $propFind->handle(self::PERMISSIONS_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::PERMISSIONS_PROPERTYNAME, function () use ($node) { $perms = $node->getDavPermissions(); if ($this->isPublic) { // remove mount information @@ -322,13 +322,13 @@ class FilesPlugin extends ServerPlugin { return $perms; }); - $propFind->handle(self::SHARE_PERMISSIONS_PROPERTYNAME, function() use ($node, $httpRequest) { + $propFind->handle(self::SHARE_PERMISSIONS_PROPERTYNAME, function () use ($node, $httpRequest) { return $node->getSharePermissions( $httpRequest->getRawServerValue('PHP_AUTH_USER') ); }); - $propFind->handle(self::OCM_SHARE_PERMISSIONS_PROPERTYNAME, function() use ($node, $httpRequest) { + $propFind->handle(self::OCM_SHARE_PERMISSIONS_PROPERTYNAME, function () use ($node, $httpRequest) { $ncPermissions = $node->getSharePermissions( $httpRequest->getRawServerValue('PHP_AUTH_USER') ); @@ -336,11 +336,11 @@ class FilesPlugin extends ServerPlugin { return json_encode($ocmPermissions); }); - $propFind->handle(self::GETETAG_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::GETETAG_PROPERTYNAME, function () use ($node) { return $node->getETag(); }); - $propFind->handle(self::OWNER_ID_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::OWNER_ID_PROPERTYNAME, function () use ($node) { $owner = $node->getOwner(); if (!$owner) { return null; @@ -348,7 +348,7 @@ class FilesPlugin extends ServerPlugin { return $owner->getUID(); } }); - $propFind->handle(self::OWNER_DISPLAY_NAME_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::OWNER_DISPLAY_NAME_PROPERTYNAME, function () use ($node) { $owner = $node->getOwner(); if (!$owner) { return null; @@ -360,14 +360,14 @@ class FilesPlugin extends ServerPlugin { $propFind->handle(self::HAS_PREVIEW_PROPERTYNAME, function () use ($node) { return json_encode($this->previewManager->isAvailable($node->getFileInfo())); }); - $propFind->handle(self::SIZE_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::SIZE_PROPERTYNAME, function () use ($node) { return $node->getSize(); }); $propFind->handle(self::MOUNT_TYPE_PROPERTYNAME, function () use ($node) { return $node->getFileInfo()->getMountPoint()->getMountType(); }); - $propFind->handle(self::SHARE_NOTE, function() use ($node, $httpRequest) { + $propFind->handle(self::SHARE_NOTE, function () use ($node, $httpRequest) { return $node->getNoteFromShare( $httpRequest->getRawServerValue('PHP_AUTH_USER') ); @@ -375,13 +375,13 @@ class FilesPlugin extends ServerPlugin { } if ($node instanceof \OCA\DAV\Connector\Sabre\Node) { - $propFind->handle(self::DATA_FINGERPRINT_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::DATA_FINGERPRINT_PROPERTYNAME, function () use ($node) { return $this->config->getSystemValue('data-fingerprint', ''); }); } if ($node instanceof \OCA\DAV\Connector\Sabre\File) { - $propFind->handle(self::DOWNLOADURL_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::DOWNLOADURL_PROPERTYNAME, function () use ($node) { /** @var $node \OCA\DAV\Connector\Sabre\File */ try { $directDownloadUrl = $node->getDirectDownload(); @@ -396,7 +396,7 @@ class FilesPlugin extends ServerPlugin { return false; }); - $propFind->handle(self::CHECKSUMS_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::CHECKSUMS_PROPERTYNAME, function () use ($node) { $checksum = $node->getChecksum(); if ($checksum === null || $checksum === '') { return null; @@ -405,22 +405,22 @@ class FilesPlugin extends ServerPlugin { return new ChecksumList($checksum); }); - $propFind->handle(self::CREATION_TIME_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::CREATION_TIME_PROPERTYNAME, function () use ($node) { return $node->getFileInfo()->getCreationTime(); }); - $propFind->handle(self::UPLOAD_TIME_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::UPLOAD_TIME_PROPERTYNAME, function () use ($node) { return $node->getFileInfo()->getUploadTime(); }); } if ($node instanceof \OCA\DAV\Connector\Sabre\Directory) { - $propFind->handle(self::SIZE_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::SIZE_PROPERTYNAME, function () use ($node) { return $node->getSize(); }); - $propFind->handle(self::IS_ENCRYPTED_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::IS_ENCRYPTED_PROPERTYNAME, function () use ($node) { return $node->getFileInfo()->isEncrypted() ? '1' : '0'; }); } @@ -467,14 +467,14 @@ class FilesPlugin extends ServerPlugin { return; } - $propPatch->handle(self::LASTMODIFIED_PROPERTYNAME, function($time) use ($node) { + $propPatch->handle(self::LASTMODIFIED_PROPERTYNAME, function ($time) use ($node) { if (empty($time)) { return false; } $node->touch($time); return true; }); - $propPatch->handle(self::GETETAG_PROPERTYNAME, function($etag) use ($node) { + $propPatch->handle(self::GETETAG_PROPERTYNAME, function ($etag) use ($node) { if (empty($etag)) { return false; } @@ -483,7 +483,7 @@ class FilesPlugin extends ServerPlugin { } return false; }); - $propPatch->handle(self::CREATION_TIME_PROPERTYNAME, function($time) use ($node) { + $propPatch->handle(self::CREATION_TIME_PROPERTYNAME, function ($time) use ($node) { if (empty($time)) { return false; } diff --git a/apps/dav/lib/Connector/Sabre/Principal.php b/apps/dav/lib/Connector/Sabre/Principal.php index 2fa01c0315d..73ebabdc48f 100644 --- a/apps/dav/lib/Connector/Sabre/Principal.php +++ b/apps/dav/lib/Connector/Sabre/Principal.php @@ -273,7 +273,7 @@ class Principal implements BackendInterface { $users = $this->userManager->getByEmail($value); if (!$allowEnumeration) { - $users = \array_filter($users, static function(IUser $user) use ($value) { + $users = \array_filter($users, static function (IUser $user) use ($value) { return $user->getEMailAddress() === $value; }); } @@ -287,7 +287,7 @@ class Principal implements BackendInterface { }); } - $results[] = array_reduce($users, function(array $carry, IUser $user) use ($restrictGroups) { + $results[] = array_reduce($users, function (array $carry, IUser $user) use ($restrictGroups) { // is sharing restricted to groups only? if ($restrictGroups !== false) { $userGroups = $this->groupManager->getUserGroupIds($user); @@ -305,7 +305,7 @@ class Principal implements BackendInterface { $users = $this->userManager->searchDisplayName($value); if (!$allowEnumeration) { - $users = \array_filter($users, static function(IUser $user) use ($value) { + $users = \array_filter($users, static function (IUser $user) use ($value) { return $user->getDisplayName() === $value; }); } @@ -319,7 +319,7 @@ class Principal implements BackendInterface { }); } - $results[] = array_reduce($users, function(array $carry, IUser $user) use ($restrictGroups) { + $results[] = array_reduce($users, function (array $carry, IUser $user) use ($restrictGroups) { // is sharing restricted to groups only? if ($restrictGroups !== false) { $userGroups = $this->groupManager->getUserGroupIds($user); @@ -518,7 +518,7 @@ class Principal implements BackendInterface { $circles = \OCA\Circles\Api\v1\Circles::joinedCircles($name, true); - $circles = array_map(function($circle) { + $circles = array_map(function ($circle) { /** @var \OCA\Circles\Model\Circle $circle */ return 'principals/circles/' . urlencode($circle->getUniqueId()); }, $circles); diff --git a/apps/dav/lib/Connector/Sabre/SharesPlugin.php b/apps/dav/lib/Connector/Sabre/SharesPlugin.php index 8b811226734..ef1e7236c9b 100644 --- a/apps/dav/lib/Connector/Sabre/SharesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/SharesPlugin.php @@ -200,14 +200,14 @@ class SharesPlugin extends \Sabre\DAV\ServerPlugin { $propFind->handle(self::SHARETYPES_PROPERTYNAME, function () use ($sabreNode) { $shares = $this->getShares($sabreNode); - $shareTypes = array_unique(array_map(function(IShare $share) { + $shareTypes = array_unique(array_map(function (IShare $share) { return $share->getShareType(); }, $shares)); return new ShareTypeList($shareTypes); }); - $propFind->handle(self::SHAREES_PROPERTYNAME, function() use ($sabreNode) { + $propFind->handle(self::SHAREES_PROPERTYNAME, function () use ($sabreNode) { $shares = $this->getShares($sabreNode); return new ShareeList($shares); diff --git a/apps/dav/lib/Connector/Sabre/TagsPlugin.php b/apps/dav/lib/Connector/Sabre/TagsPlugin.php index 9cefe682de9..83995a31e57 100644 --- a/apps/dav/lib/Connector/Sabre/TagsPlugin.php +++ b/apps/dav/lib/Connector/Sabre/TagsPlugin.php @@ -246,12 +246,12 @@ class TagsPlugin extends \Sabre\DAV\ServerPlugin $isFav = null; - $propFind->handle(self::TAGS_PROPERTYNAME, function() use (&$isFav, $node) { + $propFind->handle(self::TAGS_PROPERTYNAME, function () use (&$isFav, $node) { list($tags, $isFav) = $this->getTagsAndFav($node->getId()); return new TagList($tags); }); - $propFind->handle(self::FAVORITE_PROPERTYNAME, function() use ($isFav, $node) { + $propFind->handle(self::FAVORITE_PROPERTYNAME, function () use ($isFav, $node) { if (is_null($isFav)) { list(, $isFav) = $this->getTagsAndFav($node->getId()); } @@ -277,12 +277,12 @@ class TagsPlugin extends \Sabre\DAV\ServerPlugin return; } - $propPatch->handle(self::TAGS_PROPERTYNAME, function($tagList) use ($node) { + $propPatch->handle(self::TAGS_PROPERTYNAME, function ($tagList) use ($node) { $this->updateTags($node->getId(), $tagList->getTags()); return true; }); - $propPatch->handle(self::FAVORITE_PROPERTYNAME, function($favState) use ($node) { + $propPatch->handle(self::FAVORITE_PROPERTYNAME, function ($favState) use ($node) { if ((int)$favState === 1 || $favState === 'true') { $this->getTagger()->tagAs($node->getId(), self::TAG_FAVORITE); } else { diff --git a/apps/dav/lib/Controller/BirthdayCalendarController.php b/apps/dav/lib/Controller/BirthdayCalendarController.php index 6eb014985d5..3be7b28c51b 100644 --- a/apps/dav/lib/Controller/BirthdayCalendarController.php +++ b/apps/dav/lib/Controller/BirthdayCalendarController.php @@ -78,7 +78,7 @@ class BirthdayCalendarController extends Controller { IDBConnection $db, IConfig $config, IJobList $jobList, IUserManager $userManager, - CalDavBackend $calDavBackend){ + CalDavBackend $calDavBackend) { parent::__construct($appName, $request); $this->db = $db; $this->config = $config; @@ -94,7 +94,7 @@ class BirthdayCalendarController extends Controller { $this->config->setAppValue($this->appName, 'generateBirthdayCalendar', 'yes'); // add background job for each user - $this->userManager->callForSeenUsers(function(IUser $user) { + $this->userManager->callForSeenUsers(function (IUser $user) { $this->jobList->add(GenerateBirthdayCalendarBackgroundJob::class, [ 'userId' => $user->getUID(), ]); diff --git a/apps/dav/lib/DAV/GroupPrincipalBackend.php b/apps/dav/lib/DAV/GroupPrincipalBackend.php index b610420faae..04fe0223607 100644 --- a/apps/dav/lib/DAV/GroupPrincipalBackend.php +++ b/apps/dav/lib/DAV/GroupPrincipalBackend.php @@ -134,7 +134,7 @@ class GroupPrincipalBackend implements BackendInterface { return []; } - return array_map(function($user) { + return array_map(function ($user) { return $this->userToPrincipal($user); }, $group->getUsers()); } @@ -210,7 +210,7 @@ class GroupPrincipalBackend implements BackendInterface { case '{DAV:}displayname': $groups = $this->groupManager->search($value); - $results[] = array_reduce($groups, function(array $carry, IGroup $group) use ($restrictGroups) { + $results[] = array_reduce($groups, function (array $carry, IGroup $group) use ($restrictGroups) { $gid = $group->getGID(); // is sharing restricted to groups only? if ($restrictGroups !== false) { diff --git a/apps/dav/lib/DAV/Sharing/Plugin.php b/apps/dav/lib/DAV/Sharing/Plugin.php index 2723dcf8bf7..fec26f145ad 100644 --- a/apps/dav/lib/DAV/Sharing/Plugin.php +++ b/apps/dav/lib/DAV/Sharing/Plugin.php @@ -192,7 +192,7 @@ class Plugin extends ServerPlugin { function propFind(PropFind $propFind, INode $node) { if ($node instanceof IShareable) { - $propFind->handle('{' . Plugin::NS_OWNCLOUD . '}invite', function() use ($node) { + $propFind->handle('{' . Plugin::NS_OWNCLOUD . '}invite', function () use ($node) { return new Invite( $node->getShares() ); diff --git a/apps/dav/lib/Files/Sharing/FilesDropPlugin.php b/apps/dav/lib/Files/Sharing/FilesDropPlugin.php index 57c81ba15f6..6dbdeaa6fd9 100644 --- a/apps/dav/lib/Files/Sharing/FilesDropPlugin.php +++ b/apps/dav/lib/Files/Sharing/FilesDropPlugin.php @@ -66,7 +66,7 @@ class FilesDropPlugin extends ServerPlugin { $this->enabled = false; } - public function beforeMethod(RequestInterface $request, ResponseInterface $response){ + public function beforeMethod(RequestInterface $request, ResponseInterface $response) { if (!$this->enabled) { return; diff --git a/apps/dav/lib/Files/Sharing/PublicLinkCheckPlugin.php b/apps/dav/lib/Files/Sharing/PublicLinkCheckPlugin.php index eaa3d78b66d..60e11884765 100644 --- a/apps/dav/lib/Files/Sharing/PublicLinkCheckPlugin.php +++ b/apps/dav/lib/Files/Sharing/PublicLinkCheckPlugin.php @@ -56,7 +56,7 @@ class PublicLinkCheckPlugin extends ServerPlugin { $server->on('beforeMethod:*', [$this, 'beforeMethod']); } - public function beforeMethod(RequestInterface $request, ResponseInterface $response){ + public function beforeMethod(RequestInterface $request, ResponseInterface $response) { // verify that the owner didn't have his share permissions revoked if ($this->fileInfo && !$this->fileInfo->isShareable()) { throw new NotFound(); diff --git a/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php b/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php index 99f45640560..e4feaf5d42f 100644 --- a/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php +++ b/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php @@ -156,7 +156,7 @@ class AppleProvisioningPlugin extends ServerPlugin { $filename = $userId . '-' . AppleProvisioningNode::FILENAME; $xmlSkeleton = $this->getTemplate(); - $body = vsprintf($xmlSkeleton, array_map(function($v) { + $body = vsprintf($xmlSkeleton, array_map(function ($v) { return \htmlspecialchars($v, ENT_XML1, 'UTF-8'); }, [ $description, diff --git a/apps/dav/lib/Server.php b/apps/dav/lib/Server.php index 230e72fd277..1a432008a3a 100644 --- a/apps/dav/lib/Server.php +++ b/apps/dav/lib/Server.php @@ -295,7 +295,7 @@ class Server { \OC::$server->getThemingDefaults(), \OC::$server->getRequest(), \OC::$server->getL10N('dav'), - function() { + function () { return UUIDUtil::getUUID(); } )); diff --git a/apps/dav/lib/SystemTag/SystemTagPlugin.php b/apps/dav/lib/SystemTag/SystemTagPlugin.php index 6d1668acf06..4ca7b041884 100644 --- a/apps/dav/lib/SystemTag/SystemTagPlugin.php +++ b/apps/dav/lib/SystemTag/SystemTagPlugin.php @@ -226,29 +226,29 @@ class SystemTagPlugin extends \Sabre\DAV\ServerPlugin { return; } - $propFind->handle(self::ID_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::ID_PROPERTYNAME, function () use ($node) { return $node->getSystemTag()->getId(); }); - $propFind->handle(self::DISPLAYNAME_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::DISPLAYNAME_PROPERTYNAME, function () use ($node) { return $node->getSystemTag()->getName(); }); - $propFind->handle(self::USERVISIBLE_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::USERVISIBLE_PROPERTYNAME, function () use ($node) { return $node->getSystemTag()->isUserVisible() ? 'true' : 'false'; }); - $propFind->handle(self::USERASSIGNABLE_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::USERASSIGNABLE_PROPERTYNAME, function () use ($node) { // this is the tag's inherent property "is user assignable" return $node->getSystemTag()->isUserAssignable() ? 'true' : 'false'; }); - $propFind->handle(self::CANASSIGN_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::CANASSIGN_PROPERTYNAME, function () use ($node) { // this is the effective permission for the current user return $this->tagManager->canUserAssignTag($node->getSystemTag(), $this->userSession->getUser()) ? 'true' : 'false'; }); - $propFind->handle(self::GROUPS_PROPERTYNAME, function() use ($node) { + $propFind->handle(self::GROUPS_PROPERTYNAME, function () use ($node) { if (!$this->groupManager->isAdmin($this->userSession->getUser()->getUID())) { // property only available for admins throw new Forbidden(); @@ -281,7 +281,7 @@ class SystemTagPlugin extends \Sabre\DAV\ServerPlugin { self::USERVISIBLE_PROPERTYNAME, self::USERASSIGNABLE_PROPERTYNAME, self::GROUPS_PROPERTYNAME, - ], function($props) use ($node) { + ], function ($props) use ($node) { $tag = $node->getSystemTag(); $name = $tag->getName(); $userVisible = $tag->isUserVisible(); diff --git a/apps/dav/lib/SystemTag/SystemTagsByIdCollection.php b/apps/dav/lib/SystemTag/SystemTagsByIdCollection.php index c033b1ce139..e44150aaabe 100644 --- a/apps/dav/lib/SystemTag/SystemTagsByIdCollection.php +++ b/apps/dav/lib/SystemTag/SystemTagsByIdCollection.php @@ -122,7 +122,7 @@ class SystemTagsByIdCollection implements ICollection { } $tags = $this->tagManager->getAllTags($visibilityFilter); - return array_map(function($tag) { + return array_map(function ($tag) { return $this->makeNode($tag); }, $tags); } diff --git a/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php b/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php index 88c6f5a4648..712a18d5dbc 100644 --- a/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php +++ b/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php @@ -138,11 +138,11 @@ class SystemTagsObjectMappingCollection implements ICollection { $tags = $this->tagManager->getTagsByIds($tagIds); // filter out non-visible tags - $tags = array_filter($tags, function($tag) { + $tags = array_filter($tags, function ($tag) { return $this->tagManager->canUserSeeTag($tag, $this->user); }); - return array_values(array_map(function($tag) { + return array_values(array_map(function ($tag) { return $this->makeNode($tag); }, $tags)); } diff --git a/apps/dav/lib/SystemTag/SystemTagsRelationsCollection.php b/apps/dav/lib/SystemTag/SystemTagsRelationsCollection.php index 45fc3c14291..e85480d4a2f 100644 --- a/apps/dav/lib/SystemTag/SystemTagsRelationsCollection.php +++ b/apps/dav/lib/SystemTag/SystemTagsRelationsCollection.php @@ -60,7 +60,7 @@ class SystemTagsRelationsCollection extends SimpleCollection { $tagMapper, $userSession, $groupManager, - function($name) { + function ($name) { $nodes = \OC::$server->getUserFolder()->getById((int)$name); return !empty($nodes); } diff --git a/apps/dav/lib/Traits/PrincipalProxyTrait.php b/apps/dav/lib/Traits/PrincipalProxyTrait.php index d8f06a69f8e..ee8ac58e3c6 100644 --- a/apps/dav/lib/Traits/PrincipalProxyTrait.php +++ b/apps/dav/lib/Traits/PrincipalProxyTrait.php @@ -150,7 +150,7 @@ trait PrincipalProxyTrait { $proxy->setPermissions($proxy->getPermissions() | $permission); $this->proxyMapper->update($proxy); - $proxies = array_filter($proxies, function(Proxy $p) use ($proxy) { + $proxies = array_filter($proxies, function (Proxy $p) use ($proxy) { return $p->getId() !== $proxy->getId(); }); break; diff --git a/apps/dav/lib/Upload/FutureFile.php b/apps/dav/lib/Upload/FutureFile.php index 923376c8eab..34a5981bda2 100644 --- a/apps/dav/lib/Upload/FutureFile.php +++ b/apps/dav/lib/Upload/FutureFile.php @@ -86,7 +86,7 @@ class FutureFile implements \Sabre\DAV\IFile { */ function getSize() { $children = $this->root->getChildren(); - $sizes = array_map(function($node) { + $sizes = array_map(function ($node) { /** @var IFile $node */ return $node->getSize(); }, $children); diff --git a/apps/dav/lib/Upload/UploadHome.php b/apps/dav/lib/Upload/UploadHome.php index 77a5043b3a4..8bc96d8cf1f 100644 --- a/apps/dav/lib/Upload/UploadHome.php +++ b/apps/dav/lib/Upload/UploadHome.php @@ -59,7 +59,7 @@ class UploadHome implements ICollection { } public function getChildren(): array { - return array_map(function($node) { + return array_map(function ($node) { return new UploadFolder($node, $this->cleanupService); }, $this->impl()->getChildren()); } |