@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | * @param array $urlParams |
75 | 75 | * @param ServerContainer $server |
76 | 76 | */ |
77 | - public function __construct($appName, $urlParams = array(), ServerContainer $server = null){ |
|
77 | + public function __construct($appName, $urlParams = array(), ServerContainer $server = null) { |
|
78 | 78 | parent::__construct(); |
79 | 79 | $this['AppName'] = $appName; |
80 | 80 | $this['urlParams'] = $urlParams; |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | /** |
95 | 95 | * Core services |
96 | 96 | */ |
97 | - $this->registerService(IOutput::class, function($c){ |
|
97 | + $this->registerService(IOutput::class, function($c) { |
|
98 | 98 | return new Output($this->getServer()->getWebRoot()); |
99 | 99 | }); |
100 | 100 | |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | return $this->getServer()->getUserFolder(); |
103 | 103 | }); |
104 | 104 | |
105 | - $this->registerService(IAppData::class, function (SimpleContainer $c) { |
|
105 | + $this->registerService(IAppData::class, function(SimpleContainer $c) { |
|
106 | 106 | return $this->getServer()->getAppDataDir($c->query('AppName')); |
107 | 107 | }); |
108 | 108 | |
@@ -123,25 +123,25 @@ discard block |
||
123 | 123 | |
124 | 124 | $this->registerAlias(\OC\User\Session::class, \OCP\IUserSession::class); |
125 | 125 | |
126 | - $this->registerService(IServerContainer::class, function ($c) { |
|
126 | + $this->registerService(IServerContainer::class, function($c) { |
|
127 | 127 | return $this->getServer(); |
128 | 128 | }); |
129 | 129 | $this->registerAlias('ServerContainer', IServerContainer::class); |
130 | 130 | |
131 | - $this->registerService(\OCP\WorkflowEngine\IManager::class, function ($c) { |
|
131 | + $this->registerService(\OCP\WorkflowEngine\IManager::class, function($c) { |
|
132 | 132 | return $c->query('OCA\WorkflowEngine\Manager'); |
133 | 133 | }); |
134 | 134 | |
135 | - $this->registerService(\OCP\AppFramework\IAppContainer::class, function ($c) { |
|
135 | + $this->registerService(\OCP\AppFramework\IAppContainer::class, function($c) { |
|
136 | 136 | return $c; |
137 | 137 | }); |
138 | 138 | |
139 | 139 | // commonly used attributes |
140 | - $this->registerService('UserId', function ($c) { |
|
140 | + $this->registerService('UserId', function($c) { |
|
141 | 141 | return $c->query('OCP\\IUserSession')->getSession()->get('user_id'); |
142 | 142 | }); |
143 | 143 | |
144 | - $this->registerService('WebRoot', function ($c) { |
|
144 | + $this->registerService('WebRoot', function($c) { |
|
145 | 145 | return $c->query('ServerContainer')->getWebRoot(); |
146 | 146 | }); |
147 | 147 | |
@@ -149,11 +149,11 @@ discard block |
||
149 | 149 | return Util::getDefaultEmailAddress('no-reply'); |
150 | 150 | }); |
151 | 151 | |
152 | - $this->registerService('OC_Defaults', function ($c) { |
|
152 | + $this->registerService('OC_Defaults', function($c) { |
|
153 | 153 | return $c->getServer()->getThemingDefaults(); |
154 | 154 | }); |
155 | 155 | |
156 | - $this->registerService('OCP\Encryption\IManager', function ($c) { |
|
156 | + $this->registerService('OCP\Encryption\IManager', function($c) { |
|
157 | 157 | return $this->getServer()->getEncryptionManager(); |
158 | 158 | }); |
159 | 159 | |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | return $c->query(Validator::class); |
162 | 162 | }); |
163 | 163 | |
164 | - $this->registerService(\OC\Security\IdentityProof\Manager::class, function ($c) { |
|
164 | + $this->registerService(\OC\Security\IdentityProof\Manager::class, function($c) { |
|
165 | 165 | return new \OC\Security\IdentityProof\Manager( |
166 | 166 | $this->getServer()->getAppDataDir('identityproof'), |
167 | 167 | $this->getServer()->getCrypto() |
@@ -172,15 +172,15 @@ discard block |
||
172 | 172 | /** |
173 | 173 | * App Framework APIs |
174 | 174 | */ |
175 | - $this->registerService('API', function($c){ |
|
175 | + $this->registerService('API', function($c) { |
|
176 | 176 | $c->query('OCP\\ILogger')->debug( |
177 | - 'Accessing the API class is deprecated! Use the appropriate ' . |
|
177 | + 'Accessing the API class is deprecated! Use the appropriate '. |
|
178 | 178 | 'services instead!' |
179 | 179 | ); |
180 | 180 | return new API($c['AppName']); |
181 | 181 | }); |
182 | 182 | |
183 | - $this->registerService('Protocol', function($c){ |
|
183 | + $this->registerService('Protocol', function($c) { |
|
184 | 184 | /** @var \OC\Server $server */ |
185 | 185 | $server = $c->query('ServerContainer'); |
186 | 186 | $protocol = $server->getRequest()->getHttpProtocol(); |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | ); |
247 | 247 | }); |
248 | 248 | |
249 | - $this->registerService('TwoFactorMiddleware', function (SimpleContainer $c) use ($app) { |
|
249 | + $this->registerService('TwoFactorMiddleware', function(SimpleContainer $c) use ($app) { |
|
250 | 250 | $twoFactorManager = $c->getServer()->getTwoFactorAuthManager(); |
251 | 251 | $userSession = $app->getServer()->getUserSession(); |
252 | 252 | $session = $app->getServer()->getSession(); |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | return new TwoFactorMiddleware($twoFactorManager, $userSession, $session, $urlGenerator, $reflector, $request); |
257 | 257 | }); |
258 | 258 | |
259 | - $this->registerService('OCSMiddleware', function (SimpleContainer $c) { |
|
259 | + $this->registerService('OCSMiddleware', function(SimpleContainer $c) { |
|
260 | 260 | return new OCSMiddleware( |
261 | 261 | $c['Request'] |
262 | 262 | ); |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | $dispatcher->registerMiddleware($c['SecurityMiddleware']); |
271 | 271 | $dispatcher->registerMiddleWare($c['TwoFactorMiddleware']); |
272 | 272 | |
273 | - foreach($middleWares as $middleWare) { |
|
273 | + foreach ($middleWares as $middleWare) { |
|
274 | 274 | $dispatcher->registerMiddleware($c[$middleWare]); |
275 | 275 | } |
276 | 276 | |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | * @return mixed |
343 | 343 | */ |
344 | 344 | function log($message, $level) { |
345 | - switch($level){ |
|
345 | + switch ($level) { |
|
346 | 346 | case 'debug': |
347 | 347 | $level = \OCP\Util::DEBUG; |
348 | 348 | break; |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | $this->registerAlias(\OCP\Contacts\IManager::class, \OC\ContactsManager::class); |
130 | 130 | $this->registerAlias('ContactsManager', \OCP\Contacts\IManager::class); |
131 | 131 | |
132 | - $this->registerService(\OCP\IPreview::class, function (Server $c) { |
|
132 | + $this->registerService(\OCP\IPreview::class, function(Server $c) { |
|
133 | 133 | return new PreviewManager( |
134 | 134 | $c->getConfig(), |
135 | 135 | $c->getRootFolder(), |
@@ -140,13 +140,13 @@ discard block |
||
140 | 140 | }); |
141 | 141 | $this->registerAlias('PreviewManager', \OCP\IPreview::class); |
142 | 142 | |
143 | - $this->registerService(\OC\Preview\Watcher::class, function (Server $c) { |
|
143 | + $this->registerService(\OC\Preview\Watcher::class, function(Server $c) { |
|
144 | 144 | return new \OC\Preview\Watcher( |
145 | 145 | $c->getAppDataDir('preview') |
146 | 146 | ); |
147 | 147 | }); |
148 | 148 | |
149 | - $this->registerService('EncryptionManager', function (Server $c) { |
|
149 | + $this->registerService('EncryptionManager', function(Server $c) { |
|
150 | 150 | $view = new View(); |
151 | 151 | $util = new Encryption\Util( |
152 | 152 | $view, |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | ); |
165 | 165 | }); |
166 | 166 | |
167 | - $this->registerService('EncryptionFileHelper', function (Server $c) { |
|
167 | + $this->registerService('EncryptionFileHelper', function(Server $c) { |
|
168 | 168 | $util = new Encryption\Util( |
169 | 169 | new View(), |
170 | 170 | $c->getUserManager(), |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | return new Encryption\File($util); |
175 | 175 | }); |
176 | 176 | |
177 | - $this->registerService('EncryptionKeyStorage', function (Server $c) { |
|
177 | + $this->registerService('EncryptionKeyStorage', function(Server $c) { |
|
178 | 178 | $view = new View(); |
179 | 179 | $util = new Encryption\Util( |
180 | 180 | $view, |
@@ -185,32 +185,32 @@ discard block |
||
185 | 185 | |
186 | 186 | return new Encryption\Keys\Storage($view, $util); |
187 | 187 | }); |
188 | - $this->registerService('TagMapper', function (Server $c) { |
|
188 | + $this->registerService('TagMapper', function(Server $c) { |
|
189 | 189 | return new TagMapper($c->getDatabaseConnection()); |
190 | 190 | }); |
191 | 191 | |
192 | - $this->registerService(\OCP\ITagManager::class, function (Server $c) { |
|
192 | + $this->registerService(\OCP\ITagManager::class, function(Server $c) { |
|
193 | 193 | $tagMapper = $c->query('TagMapper'); |
194 | 194 | return new TagManager($tagMapper, $c->getUserSession()); |
195 | 195 | }); |
196 | 196 | $this->registerAlias('TagManager', \OCP\ITagManager::class); |
197 | 197 | |
198 | - $this->registerService('SystemTagManagerFactory', function (Server $c) { |
|
198 | + $this->registerService('SystemTagManagerFactory', function(Server $c) { |
|
199 | 199 | $config = $c->getConfig(); |
200 | 200 | $factoryClass = $config->getSystemValue('systemtags.managerFactory', '\OC\SystemTag\ManagerFactory'); |
201 | 201 | /** @var \OC\SystemTag\ManagerFactory $factory */ |
202 | 202 | $factory = new $factoryClass($this); |
203 | 203 | return $factory; |
204 | 204 | }); |
205 | - $this->registerService(\OCP\SystemTag\ISystemTagManager::class, function (Server $c) { |
|
205 | + $this->registerService(\OCP\SystemTag\ISystemTagManager::class, function(Server $c) { |
|
206 | 206 | return $c->query('SystemTagManagerFactory')->getManager(); |
207 | 207 | }); |
208 | 208 | $this->registerAlias('SystemTagManager', \OCP\SystemTag\ISystemTagManager::class); |
209 | 209 | |
210 | - $this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function (Server $c) { |
|
210 | + $this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function(Server $c) { |
|
211 | 211 | return $c->query('SystemTagManagerFactory')->getObjectMapper(); |
212 | 212 | }); |
213 | - $this->registerService('RootFolder', function (Server $c) { |
|
213 | + $this->registerService('RootFolder', function(Server $c) { |
|
214 | 214 | $manager = \OC\Files\Filesystem::getMountManager(null); |
215 | 215 | $view = new View(); |
216 | 216 | $root = new Root( |
@@ -238,30 +238,30 @@ discard block |
||
238 | 238 | }); |
239 | 239 | $this->registerAlias('LazyRootFolder', \OCP\Files\IRootFolder::class); |
240 | 240 | |
241 | - $this->registerService(\OCP\IUserManager::class, function (Server $c) { |
|
241 | + $this->registerService(\OCP\IUserManager::class, function(Server $c) { |
|
242 | 242 | $config = $c->getConfig(); |
243 | 243 | return new \OC\User\Manager($config); |
244 | 244 | }); |
245 | 245 | $this->registerAlias('UserManager', \OCP\IUserManager::class); |
246 | 246 | |
247 | - $this->registerService(\OCP\IGroupManager::class, function (Server $c) { |
|
247 | + $this->registerService(\OCP\IGroupManager::class, function(Server $c) { |
|
248 | 248 | $groupManager = new \OC\Group\Manager($this->getUserManager(), $this->getLogger()); |
249 | - $groupManager->listen('\OC\Group', 'preCreate', function ($gid) { |
|
249 | + $groupManager->listen('\OC\Group', 'preCreate', function($gid) { |
|
250 | 250 | \OC_Hook::emit('OC_Group', 'pre_createGroup', array('run' => true, 'gid' => $gid)); |
251 | 251 | }); |
252 | - $groupManager->listen('\OC\Group', 'postCreate', function (\OC\Group\Group $gid) { |
|
252 | + $groupManager->listen('\OC\Group', 'postCreate', function(\OC\Group\Group $gid) { |
|
253 | 253 | \OC_Hook::emit('OC_User', 'post_createGroup', array('gid' => $gid->getGID())); |
254 | 254 | }); |
255 | - $groupManager->listen('\OC\Group', 'preDelete', function (\OC\Group\Group $group) { |
|
255 | + $groupManager->listen('\OC\Group', 'preDelete', function(\OC\Group\Group $group) { |
|
256 | 256 | \OC_Hook::emit('OC_Group', 'pre_deleteGroup', array('run' => true, 'gid' => $group->getGID())); |
257 | 257 | }); |
258 | - $groupManager->listen('\OC\Group', 'postDelete', function (\OC\Group\Group $group) { |
|
258 | + $groupManager->listen('\OC\Group', 'postDelete', function(\OC\Group\Group $group) { |
|
259 | 259 | \OC_Hook::emit('OC_User', 'post_deleteGroup', array('gid' => $group->getGID())); |
260 | 260 | }); |
261 | - $groupManager->listen('\OC\Group', 'preAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
261 | + $groupManager->listen('\OC\Group', 'preAddUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
262 | 262 | \OC_Hook::emit('OC_Group', 'pre_addToGroup', array('run' => true, 'uid' => $user->getUID(), 'gid' => $group->getGID())); |
263 | 263 | }); |
264 | - $groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
264 | + $groupManager->listen('\OC\Group', 'postAddUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
265 | 265 | \OC_Hook::emit('OC_Group', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID())); |
266 | 266 | //Minimal fix to keep it backward compatible TODO: clean up all the GroupManager hooks |
267 | 267 | \OC_Hook::emit('OC_User', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID())); |
@@ -281,11 +281,11 @@ discard block |
||
281 | 281 | return new Store($session, $logger, $tokenProvider); |
282 | 282 | }); |
283 | 283 | $this->registerAlias(IStore::class, Store::class); |
284 | - $this->registerService('OC\Authentication\Token\DefaultTokenMapper', function (Server $c) { |
|
284 | + $this->registerService('OC\Authentication\Token\DefaultTokenMapper', function(Server $c) { |
|
285 | 285 | $dbConnection = $c->getDatabaseConnection(); |
286 | 286 | return new Authentication\Token\DefaultTokenMapper($dbConnection); |
287 | 287 | }); |
288 | - $this->registerService('OC\Authentication\Token\DefaultTokenProvider', function (Server $c) { |
|
288 | + $this->registerService('OC\Authentication\Token\DefaultTokenProvider', function(Server $c) { |
|
289 | 289 | $mapper = $c->query('OC\Authentication\Token\DefaultTokenMapper'); |
290 | 290 | $crypto = $c->getCrypto(); |
291 | 291 | $config = $c->getConfig(); |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | }); |
296 | 296 | $this->registerAlias('OC\Authentication\Token\IProvider', 'OC\Authentication\Token\DefaultTokenProvider'); |
297 | 297 | |
298 | - $this->registerService(\OCP\IUserSession::class, function (Server $c) { |
|
298 | + $this->registerService(\OCP\IUserSession::class, function(Server $c) { |
|
299 | 299 | $manager = $c->getUserManager(); |
300 | 300 | $session = new \OC\Session\Memory(''); |
301 | 301 | $timeFactory = new TimeFactory(); |
@@ -308,40 +308,40 @@ discard block |
||
308 | 308 | } |
309 | 309 | |
310 | 310 | $userSession = new \OC\User\Session($manager, $session, $timeFactory, $defaultTokenProvider, $c->getConfig(), $c->getSecureRandom()); |
311 | - $userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) { |
|
311 | + $userSession->listen('\OC\User', 'preCreateUser', function($uid, $password) { |
|
312 | 312 | \OC_Hook::emit('OC_User', 'pre_createUser', array('run' => true, 'uid' => $uid, 'password' => $password)); |
313 | 313 | }); |
314 | - $userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) { |
|
314 | + $userSession->listen('\OC\User', 'postCreateUser', function($user, $password) { |
|
315 | 315 | /** @var $user \OC\User\User */ |
316 | 316 | \OC_Hook::emit('OC_User', 'post_createUser', array('uid' => $user->getUID(), 'password' => $password)); |
317 | 317 | }); |
318 | - $userSession->listen('\OC\User', 'preDelete', function ($user) { |
|
318 | + $userSession->listen('\OC\User', 'preDelete', function($user) { |
|
319 | 319 | /** @var $user \OC\User\User */ |
320 | 320 | \OC_Hook::emit('OC_User', 'pre_deleteUser', array('run' => true, 'uid' => $user->getUID())); |
321 | 321 | }); |
322 | - $userSession->listen('\OC\User', 'postDelete', function ($user) { |
|
322 | + $userSession->listen('\OC\User', 'postDelete', function($user) { |
|
323 | 323 | /** @var $user \OC\User\User */ |
324 | 324 | \OC_Hook::emit('OC_User', 'post_deleteUser', array('uid' => $user->getUID())); |
325 | 325 | }); |
326 | - $userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) { |
|
326 | + $userSession->listen('\OC\User', 'preSetPassword', function($user, $password, $recoveryPassword) { |
|
327 | 327 | /** @var $user \OC\User\User */ |
328 | 328 | \OC_Hook::emit('OC_User', 'pre_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword)); |
329 | 329 | }); |
330 | - $userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) { |
|
330 | + $userSession->listen('\OC\User', 'postSetPassword', function($user, $password, $recoveryPassword) { |
|
331 | 331 | /** @var $user \OC\User\User */ |
332 | 332 | \OC_Hook::emit('OC_User', 'post_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword)); |
333 | 333 | }); |
334 | - $userSession->listen('\OC\User', 'preLogin', function ($uid, $password) { |
|
334 | + $userSession->listen('\OC\User', 'preLogin', function($uid, $password) { |
|
335 | 335 | \OC_Hook::emit('OC_User', 'pre_login', array('run' => true, 'uid' => $uid, 'password' => $password)); |
336 | 336 | }); |
337 | - $userSession->listen('\OC\User', 'postLogin', function ($user, $password) { |
|
337 | + $userSession->listen('\OC\User', 'postLogin', function($user, $password) { |
|
338 | 338 | /** @var $user \OC\User\User */ |
339 | 339 | \OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password)); |
340 | 340 | }); |
341 | - $userSession->listen('\OC\User', 'logout', function () { |
|
341 | + $userSession->listen('\OC\User', 'logout', function() { |
|
342 | 342 | \OC_Hook::emit('OC_User', 'logout', array()); |
343 | 343 | }); |
344 | - $userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value) { |
|
344 | + $userSession->listen('\OC\User', 'changeUser', function($user, $feature, $value) { |
|
345 | 345 | /** @var $user \OC\User\User */ |
346 | 346 | \OC_Hook::emit('OC_User', 'changeUser', array('run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value)); |
347 | 347 | }); |
@@ -349,11 +349,11 @@ discard block |
||
349 | 349 | }); |
350 | 350 | $this->registerAlias('UserSession', \OCP\IUserSession::class); |
351 | 351 | |
352 | - $this->registerService(\OC\Authentication\TwoFactorAuth\Manager::class, function (Server $c) { |
|
352 | + $this->registerService(\OC\Authentication\TwoFactorAuth\Manager::class, function(Server $c) { |
|
353 | 353 | return new \OC\Authentication\TwoFactorAuth\Manager($c->getAppManager(), $c->getSession(), $c->getConfig(), $c->getActivityManager(), $c->getLogger()); |
354 | 354 | }); |
355 | 355 | |
356 | - $this->registerService(\OCP\INavigationManager::class, function (Server $c) { |
|
356 | + $this->registerService(\OCP\INavigationManager::class, function(Server $c) { |
|
357 | 357 | return new \OC\NavigationManager($c->getAppManager(), |
358 | 358 | $c->getURLGenerator(), |
359 | 359 | $c->getL10NFactory(), |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | }); |
363 | 363 | $this->registerAlias('NavigationManager', \OCP\INavigationManager::class); |
364 | 364 | |
365 | - $this->registerService(\OC\AllConfig::class, function (Server $c) { |
|
365 | + $this->registerService(\OC\AllConfig::class, function(Server $c) { |
|
366 | 366 | return new \OC\AllConfig( |
367 | 367 | $c->getSystemConfig() |
368 | 368 | ); |
@@ -370,17 +370,17 @@ discard block |
||
370 | 370 | $this->registerAlias('AllConfig', \OC\AllConfig::class); |
371 | 371 | $this->registerAlias(\OCP\IConfig::class, \OC\AllConfig::class); |
372 | 372 | |
373 | - $this->registerService('SystemConfig', function ($c) use ($config) { |
|
373 | + $this->registerService('SystemConfig', function($c) use ($config) { |
|
374 | 374 | return new \OC\SystemConfig($config); |
375 | 375 | }); |
376 | 376 | |
377 | - $this->registerService(\OC\AppConfig::class, function (Server $c) { |
|
377 | + $this->registerService(\OC\AppConfig::class, function(Server $c) { |
|
378 | 378 | return new \OC\AppConfig($c->getDatabaseConnection()); |
379 | 379 | }); |
380 | 380 | $this->registerAlias('AppConfig', \OC\AppConfig::class); |
381 | 381 | $this->registerAlias(\OCP\IAppConfig::class, \OC\AppConfig::class); |
382 | 382 | |
383 | - $this->registerService(\OCP\L10N\IFactory::class, function (Server $c) { |
|
383 | + $this->registerService(\OCP\L10N\IFactory::class, function(Server $c) { |
|
384 | 384 | return new \OC\L10N\Factory( |
385 | 385 | $c->getConfig(), |
386 | 386 | $c->getRequest(), |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | }); |
391 | 391 | $this->registerAlias('L10NFactory', \OCP\L10N\IFactory::class); |
392 | 392 | |
393 | - $this->registerService(\OCP\IURLGenerator::class, function (Server $c) { |
|
393 | + $this->registerService(\OCP\IURLGenerator::class, function(Server $c) { |
|
394 | 394 | $config = $c->getConfig(); |
395 | 395 | $cacheFactory = $c->getMemCacheFactory(); |
396 | 396 | return new \OC\URLGenerator( |
@@ -400,10 +400,10 @@ discard block |
||
400 | 400 | }); |
401 | 401 | $this->registerAlias('URLGenerator', \OCP\IURLGenerator::class); |
402 | 402 | |
403 | - $this->registerService('AppHelper', function ($c) { |
|
403 | + $this->registerService('AppHelper', function($c) { |
|
404 | 404 | return new \OC\AppHelper(); |
405 | 405 | }); |
406 | - $this->registerService('AppFetcher', function ($c) { |
|
406 | + $this->registerService('AppFetcher', function($c) { |
|
407 | 407 | return new AppFetcher( |
408 | 408 | $this->getAppDataDir('appstore'), |
409 | 409 | $this->getHTTPClientService(), |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | $this->getConfig() |
412 | 412 | ); |
413 | 413 | }); |
414 | - $this->registerService('CategoryFetcher', function ($c) { |
|
414 | + $this->registerService('CategoryFetcher', function($c) { |
|
415 | 415 | return new CategoryFetcher( |
416 | 416 | $this->getAppDataDir('appstore'), |
417 | 417 | $this->getHTTPClientService(), |
@@ -420,21 +420,21 @@ discard block |
||
420 | 420 | ); |
421 | 421 | }); |
422 | 422 | |
423 | - $this->registerService(\OCP\ICache::class, function ($c) { |
|
423 | + $this->registerService(\OCP\ICache::class, function($c) { |
|
424 | 424 | return new Cache\File(); |
425 | 425 | }); |
426 | 426 | $this->registerAlias('UserCache', \OCP\ICache::class); |
427 | 427 | |
428 | - $this->registerService(Factory::class, function (Server $c) { |
|
428 | + $this->registerService(Factory::class, function(Server $c) { |
|
429 | 429 | $config = $c->getConfig(); |
430 | 430 | |
431 | 431 | if ($config->getSystemValue('installed', false) && !(defined('PHPUNIT_RUN') && PHPUNIT_RUN)) { |
432 | 432 | $v = \OC_App::getAppVersions(); |
433 | - $v['core'] = md5(file_get_contents(\OC::$SERVERROOT . '/version.php')); |
|
433 | + $v['core'] = md5(file_get_contents(\OC::$SERVERROOT.'/version.php')); |
|
434 | 434 | $version = implode(',', $v); |
435 | 435 | $instanceId = \OC_Util::getInstanceId(); |
436 | 436 | $path = \OC::$SERVERROOT; |
437 | - $prefix = md5($instanceId . '-' . $version . '-' . $path . '-' . \OC::$WEBROOT); |
|
437 | + $prefix = md5($instanceId.'-'.$version.'-'.$path.'-'.\OC::$WEBROOT); |
|
438 | 438 | return new \OC\Memcache\Factory($prefix, $c->getLogger(), |
439 | 439 | $config->getSystemValue('memcache.local', null), |
440 | 440 | $config->getSystemValue('memcache.distributed', null), |
@@ -451,12 +451,12 @@ discard block |
||
451 | 451 | $this->registerAlias('MemCacheFactory', Factory::class); |
452 | 452 | $this->registerAlias(ICacheFactory::class, Factory::class); |
453 | 453 | |
454 | - $this->registerService('RedisFactory', function (Server $c) { |
|
454 | + $this->registerService('RedisFactory', function(Server $c) { |
|
455 | 455 | $systemConfig = $c->getSystemConfig(); |
456 | 456 | return new RedisFactory($systemConfig); |
457 | 457 | }); |
458 | 458 | |
459 | - $this->registerService(\OCP\Activity\IManager::class, function (Server $c) { |
|
459 | + $this->registerService(\OCP\Activity\IManager::class, function(Server $c) { |
|
460 | 460 | return new \OC\Activity\Manager( |
461 | 461 | $c->getRequest(), |
462 | 462 | $c->getUserSession(), |
@@ -466,14 +466,14 @@ discard block |
||
466 | 466 | }); |
467 | 467 | $this->registerAlias('ActivityManager', \OCP\Activity\IManager::class); |
468 | 468 | |
469 | - $this->registerService(\OCP\Activity\IEventMerger::class, function (Server $c) { |
|
469 | + $this->registerService(\OCP\Activity\IEventMerger::class, function(Server $c) { |
|
470 | 470 | return new \OC\Activity\EventMerger( |
471 | 471 | $c->getL10N('lib') |
472 | 472 | ); |
473 | 473 | }); |
474 | 474 | $this->registerAlias(IValidator::class, Validator::class); |
475 | 475 | |
476 | - $this->registerService(\OCP\IAvatarManager::class, function (Server $c) { |
|
476 | + $this->registerService(\OCP\IAvatarManager::class, function(Server $c) { |
|
477 | 477 | return new AvatarManager( |
478 | 478 | $c->getUserManager(), |
479 | 479 | $c->getAppDataDir('avatar'), |
@@ -484,7 +484,7 @@ discard block |
||
484 | 484 | }); |
485 | 485 | $this->registerAlias('AvatarManager', \OCP\IAvatarManager::class); |
486 | 486 | |
487 | - $this->registerService(\OCP\ILogger::class, function (Server $c) { |
|
487 | + $this->registerService(\OCP\ILogger::class, function(Server $c) { |
|
488 | 488 | $logType = $c->query('AllConfig')->getSystemValue('log_type', 'file'); |
489 | 489 | $logger = Log::getLogClass($logType); |
490 | 490 | call_user_func(array($logger, 'init')); |
@@ -493,7 +493,7 @@ discard block |
||
493 | 493 | }); |
494 | 494 | $this->registerAlias('Logger', \OCP\ILogger::class); |
495 | 495 | |
496 | - $this->registerService(\OCP\BackgroundJob\IJobList::class, function (Server $c) { |
|
496 | + $this->registerService(\OCP\BackgroundJob\IJobList::class, function(Server $c) { |
|
497 | 497 | $config = $c->getConfig(); |
498 | 498 | return new \OC\BackgroundJob\JobList( |
499 | 499 | $c->getDatabaseConnection(), |
@@ -503,7 +503,7 @@ discard block |
||
503 | 503 | }); |
504 | 504 | $this->registerAlias('JobList', \OCP\BackgroundJob\IJobList::class); |
505 | 505 | |
506 | - $this->registerService(\OCP\Route\IRouter::class, function (Server $c) { |
|
506 | + $this->registerService(\OCP\Route\IRouter::class, function(Server $c) { |
|
507 | 507 | $cacheFactory = $c->getMemCacheFactory(); |
508 | 508 | $logger = $c->getLogger(); |
509 | 509 | if ($cacheFactory->isAvailable()) { |
@@ -515,32 +515,32 @@ discard block |
||
515 | 515 | }); |
516 | 516 | $this->registerAlias('Router', \OCP\Route\IRouter::class); |
517 | 517 | |
518 | - $this->registerService(\OCP\ISearch::class, function ($c) { |
|
518 | + $this->registerService(\OCP\ISearch::class, function($c) { |
|
519 | 519 | return new Search(); |
520 | 520 | }); |
521 | 521 | $this->registerAlias('Search', \OCP\ISearch::class); |
522 | 522 | |
523 | - $this->registerService(\OCP\Security\ISecureRandom::class, function ($c) { |
|
523 | + $this->registerService(\OCP\Security\ISecureRandom::class, function($c) { |
|
524 | 524 | return new SecureRandom(); |
525 | 525 | }); |
526 | 526 | $this->registerAlias('SecureRandom', \OCP\Security\ISecureRandom::class); |
527 | 527 | |
528 | - $this->registerService(\OCP\Security\ICrypto::class, function (Server $c) { |
|
528 | + $this->registerService(\OCP\Security\ICrypto::class, function(Server $c) { |
|
529 | 529 | return new Crypto($c->getConfig(), $c->getSecureRandom()); |
530 | 530 | }); |
531 | 531 | $this->registerAlias('Crypto', \OCP\Security\ICrypto::class); |
532 | 532 | |
533 | - $this->registerService(\OCP\Security\IHasher::class, function (Server $c) { |
|
533 | + $this->registerService(\OCP\Security\IHasher::class, function(Server $c) { |
|
534 | 534 | return new Hasher($c->getConfig()); |
535 | 535 | }); |
536 | 536 | $this->registerAlias('Hasher', \OCP\Security\IHasher::class); |
537 | 537 | |
538 | - $this->registerService(\OCP\Security\ICredentialsManager::class, function (Server $c) { |
|
538 | + $this->registerService(\OCP\Security\ICredentialsManager::class, function(Server $c) { |
|
539 | 539 | return new CredentialsManager($c->getCrypto(), $c->getDatabaseConnection()); |
540 | 540 | }); |
541 | 541 | $this->registerAlias('CredentialsManager', \OCP\Security\ICredentialsManager::class); |
542 | 542 | |
543 | - $this->registerService(IDBConnection::class, function (Server $c) { |
|
543 | + $this->registerService(IDBConnection::class, function(Server $c) { |
|
544 | 544 | $systemConfig = $c->getSystemConfig(); |
545 | 545 | $factory = new \OC\DB\ConnectionFactory($systemConfig); |
546 | 546 | $type = $systemConfig->getValue('dbtype', 'sqlite'); |
@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | }); |
555 | 555 | $this->registerAlias('DatabaseConnection', IDBConnection::class); |
556 | 556 | |
557 | - $this->registerService('HTTPHelper', function (Server $c) { |
|
557 | + $this->registerService('HTTPHelper', function(Server $c) { |
|
558 | 558 | $config = $c->getConfig(); |
559 | 559 | return new HTTPHelper( |
560 | 560 | $config, |
@@ -562,7 +562,7 @@ discard block |
||
562 | 562 | ); |
563 | 563 | }); |
564 | 564 | |
565 | - $this->registerService(\OCP\Http\Client\IClientService::class, function (Server $c) { |
|
565 | + $this->registerService(\OCP\Http\Client\IClientService::class, function(Server $c) { |
|
566 | 566 | $user = \OC_User::getUser(); |
567 | 567 | $uid = $user ? $user : null; |
568 | 568 | return new ClientService( |
@@ -572,7 +572,7 @@ discard block |
||
572 | 572 | }); |
573 | 573 | $this->registerAlias('HttpClientService', \OCP\Http\Client\IClientService::class); |
574 | 574 | |
575 | - $this->registerService(\OCP\Diagnostics\IEventLogger::class, function (Server $c) { |
|
575 | + $this->registerService(\OCP\Diagnostics\IEventLogger::class, function(Server $c) { |
|
576 | 576 | if ($c->getSystemConfig()->getValue('debug', false)) { |
577 | 577 | return new EventLogger(); |
578 | 578 | } else { |
@@ -581,7 +581,7 @@ discard block |
||
581 | 581 | }); |
582 | 582 | $this->registerAlias('EventLogger', \OCP\Diagnostics\IEventLogger::class); |
583 | 583 | |
584 | - $this->registerService(\OCP\Diagnostics\IQueryLogger::class, function (Server $c) { |
|
584 | + $this->registerService(\OCP\Diagnostics\IQueryLogger::class, function(Server $c) { |
|
585 | 585 | if ($c->getSystemConfig()->getValue('debug', false)) { |
586 | 586 | return new QueryLogger(); |
587 | 587 | } else { |
@@ -590,7 +590,7 @@ discard block |
||
590 | 590 | }); |
591 | 591 | $this->registerAlias('QueryLogger', \OCP\Diagnostics\IQueryLogger::class); |
592 | 592 | |
593 | - $this->registerService(TempManager::class, function (Server $c) { |
|
593 | + $this->registerService(TempManager::class, function(Server $c) { |
|
594 | 594 | return new TempManager( |
595 | 595 | $c->getLogger(), |
596 | 596 | $c->getConfig() |
@@ -599,7 +599,7 @@ discard block |
||
599 | 599 | $this->registerAlias('TempManager', TempManager::class); |
600 | 600 | $this->registerAlias(ITempManager::class, TempManager::class); |
601 | 601 | |
602 | - $this->registerService(AppManager::class, function (Server $c) { |
|
602 | + $this->registerService(AppManager::class, function(Server $c) { |
|
603 | 603 | return new \OC\App\AppManager( |
604 | 604 | $c->getUserSession(), |
605 | 605 | $c->getAppConfig(), |
@@ -611,7 +611,7 @@ discard block |
||
611 | 611 | $this->registerAlias('AppManager', AppManager::class); |
612 | 612 | $this->registerAlias(IAppManager::class, AppManager::class); |
613 | 613 | |
614 | - $this->registerService(\OCP\IDateTimeZone::class, function (Server $c) { |
|
614 | + $this->registerService(\OCP\IDateTimeZone::class, function(Server $c) { |
|
615 | 615 | return new DateTimeZone( |
616 | 616 | $c->getConfig(), |
617 | 617 | $c->getSession() |
@@ -619,7 +619,7 @@ discard block |
||
619 | 619 | }); |
620 | 620 | $this->registerAlias('DateTimeZone', \OCP\IDateTimeZone::class); |
621 | 621 | |
622 | - $this->registerService(\OCP\IDateTimeFormatter::class, function (Server $c) { |
|
622 | + $this->registerService(\OCP\IDateTimeFormatter::class, function(Server $c) { |
|
623 | 623 | $language = $c->getConfig()->getUserValue($c->getSession()->get('user_id'), 'core', 'lang', null); |
624 | 624 | |
625 | 625 | return new DateTimeFormatter( |
@@ -629,7 +629,7 @@ discard block |
||
629 | 629 | }); |
630 | 630 | $this->registerAlias('DateTimeFormatter', \OCP\IDateTimeFormatter::class); |
631 | 631 | |
632 | - $this->registerService(\OCP\Files\Config\IUserMountCache::class, function (Server $c) { |
|
632 | + $this->registerService(\OCP\Files\Config\IUserMountCache::class, function(Server $c) { |
|
633 | 633 | $mountCache = new UserMountCache($c->getDatabaseConnection(), $c->getUserManager(), $c->getLogger()); |
634 | 634 | $listener = new UserMountCacheListener($mountCache); |
635 | 635 | $listener->listen($c->getUserManager()); |
@@ -637,10 +637,10 @@ discard block |
||
637 | 637 | }); |
638 | 638 | $this->registerAlias('UserMountCache', \OCP\Files\Config\IUserMountCache::class); |
639 | 639 | |
640 | - $this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function (Server $c) { |
|
640 | + $this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function(Server $c) { |
|
641 | 641 | $loader = \OC\Files\Filesystem::getLoader(); |
642 | 642 | $mountCache = $c->query('UserMountCache'); |
643 | - $manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache); |
|
643 | + $manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache); |
|
644 | 644 | |
645 | 645 | // builtin providers |
646 | 646 | |
@@ -653,14 +653,14 @@ discard block |
||
653 | 653 | }); |
654 | 654 | $this->registerAlias('MountConfigManager', \OCP\Files\Config\IMountProviderCollection::class); |
655 | 655 | |
656 | - $this->registerService('IniWrapper', function ($c) { |
|
656 | + $this->registerService('IniWrapper', function($c) { |
|
657 | 657 | return new IniGetWrapper(); |
658 | 658 | }); |
659 | - $this->registerService('AsyncCommandBus', function (Server $c) { |
|
659 | + $this->registerService('AsyncCommandBus', function(Server $c) { |
|
660 | 660 | $jobList = $c->getJobList(); |
661 | 661 | return new AsyncBus($jobList); |
662 | 662 | }); |
663 | - $this->registerService('TrustedDomainHelper', function ($c) { |
|
663 | + $this->registerService('TrustedDomainHelper', function($c) { |
|
664 | 664 | return new TrustedDomainHelper($this->getConfig()); |
665 | 665 | }); |
666 | 666 | $this->registerService('Throttler', function(Server $c) { |
@@ -671,10 +671,10 @@ discard block |
||
671 | 671 | $c->getConfig() |
672 | 672 | ); |
673 | 673 | }); |
674 | - $this->registerService('IntegrityCodeChecker', function (Server $c) { |
|
674 | + $this->registerService('IntegrityCodeChecker', function(Server $c) { |
|
675 | 675 | // IConfig and IAppManager requires a working database. This code |
676 | 676 | // might however be called when ownCloud is not yet setup. |
677 | - if(\OC::$server->getSystemConfig()->getValue('installed', false)) { |
|
677 | + if (\OC::$server->getSystemConfig()->getValue('installed', false)) { |
|
678 | 678 | $config = $c->getConfig(); |
679 | 679 | $appManager = $c->getAppManager(); |
680 | 680 | } else { |
@@ -692,7 +692,7 @@ discard block |
||
692 | 692 | $c->getTempManager() |
693 | 693 | ); |
694 | 694 | }); |
695 | - $this->registerService(\OCP\IRequest::class, function ($c) { |
|
695 | + $this->registerService(\OCP\IRequest::class, function($c) { |
|
696 | 696 | if (isset($this['urlParams'])) { |
697 | 697 | $urlParams = $this['urlParams']; |
698 | 698 | } else { |
@@ -728,7 +728,7 @@ discard block |
||
728 | 728 | }); |
729 | 729 | $this->registerAlias('Request', \OCP\IRequest::class); |
730 | 730 | |
731 | - $this->registerService(\OCP\Mail\IMailer::class, function (Server $c) { |
|
731 | + $this->registerService(\OCP\Mail\IMailer::class, function(Server $c) { |
|
732 | 732 | return new Mailer( |
733 | 733 | $c->getConfig(), |
734 | 734 | $c->getLogger(), |
@@ -740,14 +740,14 @@ discard block |
||
740 | 740 | $this->registerService('LDAPProvider', function(Server $c) { |
741 | 741 | $config = $c->getConfig(); |
742 | 742 | $factoryClass = $config->getSystemValue('ldapProviderFactory', null); |
743 | - if(is_null($factoryClass)) { |
|
743 | + if (is_null($factoryClass)) { |
|
744 | 744 | throw new \Exception('ldapProviderFactory not set'); |
745 | 745 | } |
746 | 746 | /** @var \OCP\LDAP\ILDAPProviderFactory $factory */ |
747 | 747 | $factory = new $factoryClass($this); |
748 | 748 | return $factory->getLDAPProvider(); |
749 | 749 | }); |
750 | - $this->registerService('LockingProvider', function (Server $c) { |
|
750 | + $this->registerService('LockingProvider', function(Server $c) { |
|
751 | 751 | $ini = $c->getIniWrapper(); |
752 | 752 | $config = $c->getConfig(); |
753 | 753 | $ttl = $config->getSystemValue('filelocking.ttl', max(3600, $ini->getNumeric('max_execution_time'))); |
@@ -763,37 +763,37 @@ discard block |
||
763 | 763 | return new NoopLockingProvider(); |
764 | 764 | }); |
765 | 765 | |
766 | - $this->registerService(\OCP\Files\Mount\IMountManager::class, function () { |
|
766 | + $this->registerService(\OCP\Files\Mount\IMountManager::class, function() { |
|
767 | 767 | return new \OC\Files\Mount\Manager(); |
768 | 768 | }); |
769 | 769 | $this->registerAlias('MountManager', \OCP\Files\Mount\IMountManager::class); |
770 | 770 | |
771 | - $this->registerService(\OCP\Files\IMimeTypeDetector::class, function (Server $c) { |
|
771 | + $this->registerService(\OCP\Files\IMimeTypeDetector::class, function(Server $c) { |
|
772 | 772 | return new \OC\Files\Type\Detection( |
773 | 773 | $c->getURLGenerator(), |
774 | 774 | \OC::$configDir, |
775 | - \OC::$SERVERROOT . '/resources/config/' |
|
775 | + \OC::$SERVERROOT.'/resources/config/' |
|
776 | 776 | ); |
777 | 777 | }); |
778 | 778 | $this->registerAlias('MimeTypeDetector', \OCP\Files\IMimeTypeDetector::class); |
779 | 779 | |
780 | - $this->registerService(\OCP\Files\IMimeTypeLoader::class, function (Server $c) { |
|
780 | + $this->registerService(\OCP\Files\IMimeTypeLoader::class, function(Server $c) { |
|
781 | 781 | return new \OC\Files\Type\Loader( |
782 | 782 | $c->getDatabaseConnection() |
783 | 783 | ); |
784 | 784 | }); |
785 | 785 | $this->registerAlias('MimeTypeLoader', \OCP\Files\IMimeTypeLoader::class); |
786 | 786 | |
787 | - $this->registerService(\OCP\Notification\IManager::class, function (Server $c) { |
|
787 | + $this->registerService(\OCP\Notification\IManager::class, function(Server $c) { |
|
788 | 788 | return new Manager( |
789 | 789 | $c->query(IValidator::class) |
790 | 790 | ); |
791 | 791 | }); |
792 | 792 | $this->registerAlias('NotificationManager', \OCP\Notification\IManager::class); |
793 | 793 | |
794 | - $this->registerService(\OC\CapabilitiesManager::class, function (Server $c) { |
|
794 | + $this->registerService(\OC\CapabilitiesManager::class, function(Server $c) { |
|
795 | 795 | $manager = new \OC\CapabilitiesManager($c->getLogger()); |
796 | - $manager->registerCapability(function () use ($c) { |
|
796 | + $manager->registerCapability(function() use ($c) { |
|
797 | 797 | return new \OC\OCS\CoreCapabilities($c->getConfig()); |
798 | 798 | }); |
799 | 799 | return $manager; |
@@ -835,13 +835,13 @@ discard block |
||
835 | 835 | } |
836 | 836 | return new \OC_Defaults(); |
837 | 837 | }); |
838 | - $this->registerService(EventDispatcher::class, function () { |
|
838 | + $this->registerService(EventDispatcher::class, function() { |
|
839 | 839 | return new EventDispatcher(); |
840 | 840 | }); |
841 | 841 | $this->registerAlias('EventDispatcher', EventDispatcher::class); |
842 | 842 | $this->registerAlias(EventDispatcherInterface::class, EventDispatcher::class); |
843 | 843 | |
844 | - $this->registerService('CryptoWrapper', function (Server $c) { |
|
844 | + $this->registerService('CryptoWrapper', function(Server $c) { |
|
845 | 845 | // FIXME: Instantiiated here due to cyclic dependency |
846 | 846 | $request = new Request( |
847 | 847 | [ |
@@ -866,7 +866,7 @@ discard block |
||
866 | 866 | $request |
867 | 867 | ); |
868 | 868 | }); |
869 | - $this->registerService('CsrfTokenManager', function (Server $c) { |
|
869 | + $this->registerService('CsrfTokenManager', function(Server $c) { |
|
870 | 870 | $tokenGenerator = new CsrfTokenGenerator($c->getSecureRandom()); |
871 | 871 | |
872 | 872 | return new CsrfTokenManager( |
@@ -874,10 +874,10 @@ discard block |
||
874 | 874 | $c->query(SessionStorage::class) |
875 | 875 | ); |
876 | 876 | }); |
877 | - $this->registerService(SessionStorage::class, function (Server $c) { |
|
877 | + $this->registerService(SessionStorage::class, function(Server $c) { |
|
878 | 878 | return new SessionStorage($c->getSession()); |
879 | 879 | }); |
880 | - $this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function (Server $c) { |
|
880 | + $this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function(Server $c) { |
|
881 | 881 | return new ContentSecurityPolicyManager(); |
882 | 882 | }); |
883 | 883 | $this->registerAlias('ContentSecurityPolicyManager', \OCP\Security\IContentSecurityPolicyManager::class); |
@@ -928,23 +928,23 @@ discard block |
||
928 | 928 | ); |
929 | 929 | return $manager; |
930 | 930 | }); |
931 | - $this->registerService(\OC\Files\AppData\Factory::class, function (Server $c) { |
|
931 | + $this->registerService(\OC\Files\AppData\Factory::class, function(Server $c) { |
|
932 | 932 | return new \OC\Files\AppData\Factory( |
933 | 933 | $c->getRootFolder(), |
934 | 934 | $c->getSystemConfig() |
935 | 935 | ); |
936 | 936 | }); |
937 | 937 | |
938 | - $this->registerService('LockdownManager', function (Server $c) { |
|
938 | + $this->registerService('LockdownManager', function(Server $c) { |
|
939 | 939 | return new LockdownManager(); |
940 | 940 | }); |
941 | 941 | |
942 | - $this->registerService(ICloudIdManager::class, function (Server $c) { |
|
942 | + $this->registerService(ICloudIdManager::class, function(Server $c) { |
|
943 | 943 | return new CloudIdManager(); |
944 | 944 | }); |
945 | 945 | |
946 | 946 | /* To trick DI since we don't extend the DIContainer here */ |
947 | - $this->registerService(CleanPreviewsBackgroundJob::class, function (Server $c) { |
|
947 | + $this->registerService(CleanPreviewsBackgroundJob::class, function(Server $c) { |
|
948 | 948 | return new CleanPreviewsBackgroundJob( |
949 | 949 | $c->getRootFolder(), |
950 | 950 | $c->getLogger(), |
@@ -1098,7 +1098,7 @@ discard block |
||
1098 | 1098 | * @deprecated since 9.2.0 use IAppData |
1099 | 1099 | */ |
1100 | 1100 | public function getAppFolder() { |
1101 | - $dir = '/' . \OC_App::getCurrentApp(); |
|
1101 | + $dir = '/'.\OC_App::getCurrentApp(); |
|
1102 | 1102 | $root = $this->getRootFolder(); |
1103 | 1103 | if (!$root->nodeExists($dir)) { |
1104 | 1104 | $folder = $root->newFolder($dir); |