Passed
Push — master ( 6f2222...b747d6 )
by meta
02:42
created
src/Controllers/AuthController.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     public function scrubMicrosoftGraphUserData($userData)
50 50
     {
51 51
         // Fix any stupid crap with missing or null fields
52
-        if (! isset($userData['mail']) || ! $userData['mail']) {
52
+        if (!isset($userData['mail']) || !$userData['mail']) {
53 53
             \Illuminate\Support\Facades\Log::debug('graph api did not contain mail field, using userPrincipalName instead '.json_encode($userData));
54 54
             $userData['mail'] = $userData['userPrincipalName'];
55 55
         }
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         // Try to find an existing user
66 66
         $user = $userType::where($userIdField, $userData['id'])->first();
67 67
         // If we dont have an existing user
68
-        if (! $user) {
68
+        if (!$user) {
69 69
             // Go create a new one with this data
70 70
             $user = $this->createUserFromAzureData($userData);
71 71
         }
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
         // TODO: rewrite this so that if the user doesnt exist we create them and get their groups from AAD
111 111
         $user = $user_class::where('userPrincipalName', $upn)->first();
112
-        if (! $user) {
112
+        if (!$user) {
113 113
             throw new \Exception('No user found with user principal name '.$upn);
114 114
         }
115 115
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     public function loadClientCertFromWebserver()
120 120
     {
121 121
         // Make sure we got a client certificate from the web server
122
-        if (! isset($_SERVER['SSL_CLIENT_CERT']) || ! $_SERVER['SSL_CLIENT_CERT']) {
122
+        if (!isset($_SERVER['SSL_CLIENT_CERT']) || !$_SERVER['SSL_CLIENT_CERT']) {
123 123
             throw new \Exception('TLS client certificate missing');
124 124
         }
125 125
         // try to parse the certificate we got
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
     public function getUserPrincipalNameFromClientCert($x509)
135 135
     {
136 136
         $names = $x509->getExtension('id-ce-subjectAltName');
137
-        if (! $names) {
137
+        if (!$names) {
138 138
             throw new \Exception('TLS client cert missing subject alternative names');
139 139
         }
140 140
         // Search subject alt names for user principal name
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
                 }
149 149
             }
150 150
         }
151
-        if (! $upn) {
151
+        if (!$upn) {
152 152
             throw new \Exception('Could not find user principal name in TLS client cert');
153 153
         }
154 154
 
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
         $graph = new \Microsoft\Graph\Graph();
42 42
         $graph->setAccessToken($accessToken);
43 43
         $user = $graph->createRequest('GET', '/me')
44
-                      ->setReturnType(\Microsoft\Graph\Model\User::class)
45
-                      ->execute();
44
+                        ->setReturnType(\Microsoft\Graph\Model\User::class)
45
+                        ->execute();
46 46
 
47 47
         return $user->jsonSerialize();
48 48
     }
@@ -173,9 +173,9 @@  discard block
 block discarded – undo
173 173
         if (count($groups)) {
174 174
             // remove the users existing database roles before assigning new ones
175 175
             \DB::table('assigned_roles')
176
-               ->where('entity_id', $user->id)
177
-               ->where('entity_type', get_class($user))
178
-               ->delete();
176
+                ->where('entity_id', $user->id)
177
+                ->where('entity_type', get_class($user))
178
+                ->delete();
179 179
             // TRY to add the user to each group they are assigned
180 180
             try {
181 181
                 $user->assign($groups);
Please login to merge, or discard this patch.
src/Console/GenerateUIPreload.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         $path = $this->option('destination');
41 41
         $path = reset($path);
42 42
         // otherwise use the default path
43
-        if (! $path) {
43
+        if (!$path) {
44 44
             $path = 'ui/preload.js';
45 45
         }
46 46
         // fully calculated path is APPDIR/public/ui/preload.js
Please login to merge, or discard this patch.