Passed
Push — master ( 54115d...67a0b3 )
by meta
02:30
created
src/Controller/ApiAuthController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
         $roles = $user->roles()->get()->all();
57 57
         foreach ($roles as $key => $role) {
58 58
             $role->permissions = $role->abilities()->get()->all();
59
-            if (! count($role->permissions)) {
59
+            if (!count($role->permissions)) {
60 60
                 unset($roles[$key]);
61 61
             }
62 62
         }
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
@@ -15,27 +15,27 @@  discard block
 block discarded – undo
15 15
     {
16 16
         // Make sure nobody is including or running this thing without all the required env settings
17 17
         $requiredVariables = ['AZURE_AD_CLIENT_ID', 'AZURE_AD_CLIENT_SECRET', 'AZURE_AD_TENANT', 'AZURE_AD_CALLBACK_URL'];
18
-        foreach($requiredVariables as $env) {
19
-            if (! env($env)) {
18
+        foreach ($requiredVariables as $env) {
19
+            if (!env($env)) {
20 20
                 throw new \Exception('enterpriseauth setup error: missing mandatory .env value for '.$env);
21 21
             }
22 22
         }
23 23
 
24 24
         // Actually I have my own oauth token cache based authentication guard now lol
25 25
         config(['auth.guards.api.driver' => 'oauthtoken']);
26
-        Auth::extend('oauthtoken', function ($app, $name, array $config) {
26
+        Auth::extend('oauthtoken', function($app, $name, array $config) {
27 27
             return new OauthTokenGuard(Auth::createUserProvider($config['provider']), $app->make('request'));
28 28
         });
29 29
 
30 30
         // Make sure that this vendor dir and the routes dir are in any scanned paths for swagger documentation
31 31
         $swaggerScanPaths = config('l5-swagger.paths.annotations');
32
-        if (! is_array($swaggerScanPaths)) {
32
+        if (!is_array($swaggerScanPaths)) {
33 33
             $swaggerScanPaths = [$swaggerScanPaths];
34 34
         }
35
-        if (! in_array(base_path('routes'), $swaggerScanPaths)) {
35
+        if (!in_array(base_path('routes'), $swaggerScanPaths)) {
36 36
             $swaggerScanPaths[] = base_path('routes');
37 37
         }
38
-        if (! in_array(__DIR__.'/../routes/', $swaggerScanPaths)) {
38
+        if (!in_array(__DIR__.'/../routes/', $swaggerScanPaths)) {
39 39
             $swaggerScanPaths[] = __DIR__.'/../routes/';
40 40
         }
41 41
         config(['l5-swagger.paths.annotations' => $swaggerScanPaths]);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     {
66 66
         // If the routes files for the swagger oauth config is NOT present, and we have all the right info, then generate it really quick
67 67
         $swaggerAzureadFile = __DIR__.'/../routes/swagger.azuread.php';
68
-        if (! file_exists($swaggerAzureadFile)) {
68
+        if (!file_exists($swaggerAzureadFile)) {
69 69
             $aad = new AzureActiveDirectory(env('AZURE_AD_TENANT'));
70 70
             //$authorizationUrl = $aad->authorizationEndpoint . '?resource=https://graph.microsoft.com';
71 71
             $authorizationUrl = $aad->authorizationEndpoint;
Please login to merge, or discard this patch.
routes/web.microsoft.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-Route::middleware([config('enterpriseauth.routes.middleware')])->group(function () {
3
+Route::middleware([config('enterpriseauth.routes.middleware')])->group(function() {
4 4
     Route::get(config('enterpriseauth.routes.login'), 'Metaclassing\EnterpriseAuth\Controllers\WebAuthController@redirectToOauthProvider');
5 5
     Route::get(config('enterpriseauth.routes.callback'), 'Metaclassing\EnterpriseAuth\Controllers\WebAuthController@handleOauthResponse');
6 6
 
7 7
     // This handles a situation where a route with the NAME of login does not exist, we define it to keep from breaking framework redirects hard coded
8
-    if (! \Route::has('login')) {
8
+    if (!\Route::has('login')) {
9 9
         Route::get('login', 'Metaclassing\EnterpriseAuth\Controllers\WebAuthController@loginOrRegister')->name('login');
10 10
     }
11
-    if (! \Route::has('register')) {
11
+    if (!\Route::has('register')) {
12 12
         Route::get('register', 'Metaclassing\EnterpriseAuth\Controllers\WebAuthController@loginOrRegister')->name('register');
13 13
     }
14 14
 });
Please login to merge, or discard this patch.
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('enterpriseauth.apiroutes.middleware'), config('enterpriseauth.apiroutes.authmiddleware')])->group(function () {
4
+Route::middleware([config('enterpriseauth.apiroutes.middleware'), config('enterpriseauth.apiroutes.authmiddleware')])->group(function() {
5 5
 
6 6
     /**
7 7
      * @SWG\Get(
Please login to merge, or discard this patch.
archive/Authenticate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
      */
47 47
     public function guest()
48 48
     {
49
-        return ! $this->check();
49
+        return !$this->check();
50 50
     }
51 51
 
52 52
     /**
Please login to merge, or discard this patch.
archive/AzureOauthProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
     {
99 99
         //dd($user);
100 100
         // WELL this is extremely stupid. if email address isnt set, use their UPN...
101
-        if (! $user['mail']) {
101
+        if (!$user['mail']) {
102 102
             $user['mail'] = $user['userPrincipalName'];
103 103
         }
104 104
 
Please login to merge, or discard this patch.