@@ -143,7 +143,7 @@ |
||
143 | 143 | * @return boolean |
144 | 144 | */ |
145 | 145 | public function isActive(IUser $user): bool { |
146 | - $appIds = array_filter($this->appManager->getEnabledAppsForUser($user), function ($appId) { |
|
146 | + $appIds = array_filter($this->appManager->getEnabledAppsForUser($user), function($appId) { |
|
147 | 147 | return $appId !== $this->appName; |
148 | 148 | }); |
149 | 149 | foreach ($appIds as $appId) { |
@@ -48,7 +48,7 @@ |
||
48 | 48 | } |
49 | 49 | |
50 | 50 | protected function run($argument) { |
51 | - $this->syncService->syncThemAll(function ($url, $ex) { |
|
51 | + $this->syncService->syncThemAll(function($url, $ex) { |
|
52 | 52 | if ($ex instanceof \Exception) { |
53 | 53 | $this->logger->logException($ex, [ |
54 | 54 | 'message' => "Error while syncing $url.", |
@@ -57,7 +57,7 @@ |
||
57 | 57 | * @inheritDoc |
58 | 58 | */ |
59 | 59 | public function run($argument) { |
60 | - $this->userManager->callForSeenUsers(function (IUser $user) { |
|
60 | + $this->userManager->callForSeenUsers(function(IUser $user) { |
|
61 | 61 | $this->jobList->add(GenerateBirthdayCalendarBackgroundJob::class, [ |
62 | 62 | 'userId' => $user->getUID(), |
63 | 63 | 'purgeBeforeGenerating' => true |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | $addressBooks = $this->carddavBackend->getAddressBooksForUser($this->principalUri); |
74 | 74 | /** @var IAddressBook[] $objects */ |
75 | - $objects = array_map(function (array $addressBook) { |
|
75 | + $objects = array_map(function(array $addressBook) { |
|
76 | 76 | if ($addressBook['principaluri'] === 'principals/system/system') { |
77 | 77 | return new SystemAddressbook($this->carddavBackend, $addressBook, $this->l10n, $this->config); |
78 | 78 | } |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | return new AddressBook($this->carddavBackend, $addressBook, $this->l10n); |
81 | 81 | }, $addressBooks); |
82 | 82 | /** @var IAddressBook[][] $objectsFromPlugins */ |
83 | - $objectsFromPlugins = array_map(function (IAddressBookProvider $plugin): array { |
|
83 | + $objectsFromPlugins = array_map(function(IAddressBookProvider $plugin): array { |
|
84 | 84 | return $plugin->fetchAllForAddressBookHome($this->principalUri); |
85 | 85 | }, $this->pluginManager->getAddressBookPlugins()); |
86 | 86 |
@@ -60,8 +60,8 @@ |
||
60 | 60 | $tagMapper, |
61 | 61 | $userSession, |
62 | 62 | $groupManager, |
63 | - function ($name) { |
|
64 | - $nodes = \OC::$server->getUserFolder()->getById((int)$name); |
|
63 | + function($name) { |
|
64 | + $nodes = \OC::$server->getUserFolder()->getById((int) $name); |
|
65 | 65 | return !empty($nodes); |
66 | 66 | } |
67 | 67 | ), |
@@ -94,7 +94,7 @@ |
||
94 | 94 | $this->config->setAppValue($this->appName, 'generateBirthdayCalendar', 'yes'); |
95 | 95 | |
96 | 96 | // add background job for each user |
97 | - $this->userManager->callForSeenUsers(function (IUser $user) { |
|
97 | + $this->userManager->callForSeenUsers(function(IUser $user) { |
|
98 | 98 | $this->jobList->add(GenerateBirthdayCalendarBackgroundJob::class, [ |
99 | 99 | 'userId' => $user->getUID(), |
100 | 100 | ]); |
@@ -113,12 +113,12 @@ discard block |
||
113 | 113 | $this->server = $server; |
114 | 114 | |
115 | 115 | $this->server->on('method:POST', [$this, 'httpPost']); |
116 | - $this->server->on('propFind', [$this, 'propFind']); |
|
116 | + $this->server->on('propFind', [$this, 'propFind']); |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | public function propFind(PropFind $propFind, INode $node) { |
120 | 120 | if ($node instanceof Calendar) { |
121 | - $propFind->handle('{'.self::NS_CALENDARSERVER.'}publish-url', function () use ($node) { |
|
121 | + $propFind->handle('{'.self::NS_CALENDARSERVER.'}publish-url', function() use ($node) { |
|
122 | 122 | if ($node->getPublishStatus()) { |
123 | 123 | // We return the publish-url only if the calendar is published. |
124 | 124 | $token = $node->getPublishStatus(); |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | } |
129 | 129 | }); |
130 | 130 | |
131 | - $propFind->handle('{'.self::NS_CALENDARSERVER.'}allowed-sharing-modes', function () use ($node) { |
|
131 | + $propFind->handle('{'.self::NS_CALENDARSERVER.'}allowed-sharing-modes', function() use ($node) { |
|
132 | 132 | $canShare = (!$node->isSubscription() && $node->canWrite()); |
133 | 133 | $canPublish = (!$node->isSubscription() && $node->canWrite()); |
134 | 134 |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | } |
45 | 45 | |
46 | 46 | public function createFile($name, $data = null) { |
47 | - throw new Forbidden('Permission denied to create file (filename ' . $name . ')'); |
|
47 | + throw new Forbidden('Permission denied to create file (filename '.$name.')'); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | public function createDirectory($name) { |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | public function getChildren(): array { |
62 | - return array_map(function ($node) { |
|
62 | + return array_map(function($node) { |
|
63 | 63 | return new UploadFolder($node, $this->cleanupService); |
64 | 64 | }, $this->impl()->getChildren()); |
65 | 65 | } |
@@ -92,10 +92,10 @@ discard block |
||
92 | 92 | $rootView = new View(); |
93 | 93 | $user = \OC::$server->getUserSession()->getUser(); |
94 | 94 | Filesystem::initMountPoints($user->getUID()); |
95 | - if (!$rootView->file_exists('/' . $user->getUID() . '/uploads')) { |
|
96 | - $rootView->mkdir('/' . $user->getUID() . '/uploads'); |
|
95 | + if (!$rootView->file_exists('/'.$user->getUID().'/uploads')) { |
|
96 | + $rootView->mkdir('/'.$user->getUID().'/uploads'); |
|
97 | 97 | } |
98 | - $view = new View('/' . $user->getUID() . '/uploads'); |
|
98 | + $view = new View('/'.$user->getUID().'/uploads'); |
|
99 | 99 | $rootInfo = $view->getFileInfo(''); |
100 | 100 | return new Directory($view, $rootInfo); |
101 | 101 | } |
@@ -96,7 +96,7 @@ |
||
96 | 96 | $output->writeln("Start birthday calendar sync for all users ..."); |
97 | 97 | $p = new ProgressBar($output); |
98 | 98 | $p->start(); |
99 | - $this->userManager->callForSeenUsers(function ($user) use ($p) { |
|
99 | + $this->userManager->callForSeenUsers(function($user) use ($p) { |
|
100 | 100 | $p->advance(); |
101 | 101 | |
102 | 102 | $userId = $user->getUID(); |