Passed
Push — master ( ac61d7...adc4bf )
by meta
02:55
created
routes/api.microsoft.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // Authenticated user information routes
4
-Route::middleware([config('azure-oath.apiroutes.middleware'), config('azure-oath.apiroutes.authmiddleware')])->group(function () {
4
+Route::middleware([config('azure-oath.apiroutes.middleware'), config('azure-oath.apiroutes.authmiddleware')])->group(function() {
5 5
 
6 6
     /**
7 7
      * @SWG\Get(
Please login to merge, or discard this patch.
src/ApiAuthController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
     protected function mapUserToObject(array $user)
111 111
     {
112
-        if (! $user['mail']) {
112
+        if (!$user['mail']) {
113 113
             $user['mail'] = $user['userPrincipalName'];
114 114
         }
115 115
 
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
         $roles = $user->roles()->get()->all();
154 154
         foreach ($roles as $key => $role) {
155 155
             $role->permissions = $role->abilities()->get()->all();
156
-            if (! count($role->permissions)) {
156
+            if (!count($role->permissions)) {
157 157
                 unset($roles[$key]);
158 158
             }
159 159
         }
Please login to merge, or discard this patch.
src/WebAuthController.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
         if (count($user->groups)) {
24 24
             // remove the users existing database roles before assigning new ones
25 25
             \DB::table('assigned_roles')
26
-               ->where('entity_id', $authUser->id)
27
-               ->where('entity_type', get_class($authUser))
28
-               ->delete();
26
+                ->where('entity_id', $authUser->id)
27
+                ->where('entity_type', get_class($authUser))
28
+                ->delete();
29 29
             // add the user to each group they are assigned
30 30
             $authUser->assign($user->groups);
31 31
         }
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
         // Check to see if there is an intended destination url saved
40 40
         $destination = $request->session()
41
-                               ->get('oauthIntendedUrl');
41
+                                ->get('oauthIntendedUrl');
42 42
         // If there is no intended destination url, use the default
43 43
         if(! $destination) {
44 44
             $destination = config('azure-oath.redirect_on_login');
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         $destination = $request->session()
41 41
                                ->get('oauthIntendedUrl');
42 42
         // If there is no intended destination url, use the default
43
-        if(! $destination) {
43
+        if (!$destination) {
44 44
             $destination = config('azure-oath.redirect_on_login');
45 45
         }
46 46
         \Illuminate\Support\Facades\Log::info('AUTH success USER ID '.$authUser->id.' with redirect url '.$destination);
Please login to merge, or discard this patch.
src/ServiceProvider.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -22,19 +22,19 @@  discard block
 block discarded – undo
22 22
     {
23 23
         // Actually I have my own oauth token cache based authentication guard now lol
24 24
         config(['auth.guards.api.driver' => 'oauthtoken']);
25
-        Auth::extend('oauthtoken', function ($app, $name, array $config) {
25
+        Auth::extend('oauthtoken', function($app, $name, array $config) {
26 26
             return new OauthTokenGuard(Auth::createUserProvider($config['provider']), $app->make('request'));
27 27
         });
28 28
 
29 29
         // Make sure that this vendor dir and the routes dir are in any scanned paths for swagger documentation
30 30
         $swaggerScanPaths = config('l5-swagger.paths.annotations');
31
-        if (! is_array($swaggerScanPaths)) {
31
+        if (!is_array($swaggerScanPaths)) {
32 32
             $swaggerScanPaths = [$swaggerScanPaths];
33 33
         }
34
-        if (! in_array(base_path('routes'), $swaggerScanPaths)) {
34
+        if (!in_array(base_path('routes'), $swaggerScanPaths)) {
35 35
             $swaggerScanPaths[] = base_path('routes');
36 36
         }
37
-        if (! in_array(__DIR__.'/../routes/', $swaggerScanPaths)) {
37
+        if (!in_array(__DIR__.'/../routes/', $swaggerScanPaths)) {
38 38
             $swaggerScanPaths[] = __DIR__.'/../routes/';
39 39
         }
40 40
         config(['l5-swagger.paths.annotations' => $swaggerScanPaths]);
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             __DIR__.'/../publish/config/azure-oath.php', 'azure-oath'
51 51
         );
52 52
 
53
-        $this->app['Laravel\Socialite\Contracts\Factory']->extend('azure-oauth', function ($app) {
53
+        $this->app['Laravel\Socialite\Contracts\Factory']->extend('azure-oauth', function($app) {
54 54
             return $app['Laravel\Socialite\Contracts\Factory']->buildProvider(
55 55
                 'Metrogistics\AzureSocialite\AzureOauthProvider',
56 56
                 config('azure-oath.credentials')
@@ -62,10 +62,10 @@  discard block
 block discarded – undo
62 62
 
63 63
         // If the routes files for the swagger oauth config is NOT present, and we have all the right info, then generate it really quick
64 64
         $swaggerAzureadFile = __DIR__.'/../routes/swagger.azuread.php';
65
-        if (! file_exists($swaggerAzureadFile) && env('AZURE_AD_CLIENT_ID') && env('AZURE_AD_OPENID_URL')) {
65
+        if (!file_exists($swaggerAzureadFile) && env('AZURE_AD_CLIENT_ID') && env('AZURE_AD_OPENID_URL')) {
66 66
             $openidConfig = $this->getOpenidConfiguration(env('AZURE_AD_OPENID_URL'));
67 67
             $authorizationUrl = $openidConfig['authorization_endpoint'];
68
-            if (! $authorizationUrl) {
68
+            if (!$authorizationUrl) {
69 69
                 throw new \Exception('Error building swagger oauth config, azure ad openid url didnt give me an authorization url!');
70 70
             }
71 71
             $client_id = env('AZURE_AD_CLIENT_ID');
Please login to merge, or discard this patch.