Completed
Push — master ( 8d55b1...6b6dee )
by Joas
50:38 queued 11:14
created
apps/provisioning_api/lib/AppInfo/Application.php 2 patches
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -32,48 +32,48 @@
 block discarded – undo
32 32
 use Psr\Container\ContainerInterface;
33 33
 
34 34
 class Application extends App implements IBootstrap {
35
-	public function __construct(array $urlParams = []) {
36
-		parent::__construct('provisioning_api', $urlParams);
37
-	}
35
+    public function __construct(array $urlParams = []) {
36
+        parent::__construct('provisioning_api', $urlParams);
37
+    }
38 38
 
39
-	public function register(IRegistrationContext $context): void {
40
-		$context->registerEventListener(UserDeletedEvent::class, UserDeletedListener::class);
39
+    public function register(IRegistrationContext $context): void {
40
+        $context->registerEventListener(UserDeletedEvent::class, UserDeletedListener::class);
41 41
 
42
-		$context->registerService(NewUserMailHelper::class, function (ContainerInterface $c) {
43
-			return new NewUserMailHelper(
44
-				$c->get(Defaults::class),
45
-				$c->get(IURLGenerator::class),
46
-				$c->get(IFactory::class),
47
-				$c->get(IMailer::class),
48
-				$c->get(ISecureRandom::class),
49
-				$c->get(ITimeFactory::class),
50
-				$c->get(IConfig::class),
51
-				$c->get(ICrypto::class),
52
-				Util::getDefaultEmailAddress('no-reply')
53
-			);
54
-		});
55
-		$context->registerService(ProvisioningApiMiddleware::class, function (ContainerInterface $c) {
56
-			$user = $c->get(IUserManager::class)->get($c->get('userId'));
57
-			$isAdmin = false;
58
-			$isSubAdmin = false;
42
+        $context->registerService(NewUserMailHelper::class, function (ContainerInterface $c) {
43
+            return new NewUserMailHelper(
44
+                $c->get(Defaults::class),
45
+                $c->get(IURLGenerator::class),
46
+                $c->get(IFactory::class),
47
+                $c->get(IMailer::class),
48
+                $c->get(ISecureRandom::class),
49
+                $c->get(ITimeFactory::class),
50
+                $c->get(IConfig::class),
51
+                $c->get(ICrypto::class),
52
+                Util::getDefaultEmailAddress('no-reply')
53
+            );
54
+        });
55
+        $context->registerService(ProvisioningApiMiddleware::class, function (ContainerInterface $c) {
56
+            $user = $c->get(IUserManager::class)->get($c->get('userId'));
57
+            $isAdmin = false;
58
+            $isSubAdmin = false;
59 59
 
60
-			if ($user instanceof IUser) {
61
-				$groupManager = $c->get(IGroupManager::class);
62
-				assert($groupManager instanceof GroupManager);
63
-				$isAdmin = $groupManager->isAdmin($user->getUID());
64
-				$isSubAdmin = $groupManager->getSubAdmin()->isSubAdmin($user);
65
-			}
60
+            if ($user instanceof IUser) {
61
+                $groupManager = $c->get(IGroupManager::class);
62
+                assert($groupManager instanceof GroupManager);
63
+                $isAdmin = $groupManager->isAdmin($user->getUID());
64
+                $isSubAdmin = $groupManager->getSubAdmin()->isSubAdmin($user);
65
+            }
66 66
 
67
-			return new ProvisioningApiMiddleware(
68
-				$c->get(IControllerMethodReflector::class),
69
-				$isAdmin,
70
-				$isSubAdmin
71
-			);
72
-		});
73
-		$context->registerMiddleware(ProvisioningApiMiddleware::class);
74
-		$context->registerCapability(Capabilities::class);
75
-	}
67
+            return new ProvisioningApiMiddleware(
68
+                $c->get(IControllerMethodReflector::class),
69
+                $isAdmin,
70
+                $isSubAdmin
71
+            );
72
+        });
73
+        $context->registerMiddleware(ProvisioningApiMiddleware::class);
74
+        $context->registerCapability(Capabilities::class);
75
+    }
76 76
 
77
-	public function boot(IBootContext $context): void {
78
-	}
77
+    public function boot(IBootContext $context): void {
78
+    }
79 79
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	public function register(IRegistrationContext $context): void {
40 40
 		$context->registerEventListener(UserDeletedEvent::class, UserDeletedListener::class);
41 41
 
42
-		$context->registerService(NewUserMailHelper::class, function (ContainerInterface $c) {
42
+		$context->registerService(NewUserMailHelper::class, function(ContainerInterface $c) {
43 43
 			return new NewUserMailHelper(
44 44
 				$c->get(Defaults::class),
45 45
 				$c->get(IURLGenerator::class),
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 				Util::getDefaultEmailAddress('no-reply')
53 53
 			);
54 54
 		});
55
-		$context->registerService(ProvisioningApiMiddleware::class, function (ContainerInterface $c) {
55
+		$context->registerService(ProvisioningApiMiddleware::class, function(ContainerInterface $c) {
56 56
 			$user = $c->get(IUserManager::class)->get($c->get('userId'));
57 57
 			$isAdmin = false;
58 58
 			$isSubAdmin = false;
Please login to merge, or discard this patch.