Passed
Push — master ( be33a7...54115d )
by meta
02:50
created
database/migrations/2018_02_19_152839_alter_users_table_for_azure_ad.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::table('users', function (Blueprint $table) {
16
+        Schema::table('users', function(Blueprint $table) {
17 17
             // Users must be able to support blank passwords for external identity
18 18
             $table->string('password')->nullable()->change();
19 19
             // We need a new string field to store the oauth provider unique id in
Please login to merge, or discard this patch.
src/Middleware/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.
src/AuthController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     public function certAuth()
32 32
     {
33 33
         // Make sure we got a client certificate from the web server
34
-        if (! $_SERVER['SSL_CLIENT_CERT']) {
34
+        if (!$_SERVER['SSL_CLIENT_CERT']) {
35 35
             throw new \Exception('TLS client certificate missing');
36 36
         }
37 37
         // try to parse the certificate we got
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         $asciicert = str_replace("\t", '', $_SERVER['SSL_CLIENT_CERT']);
41 41
         $cert = $x509->loadX509($asciicert);
42 42
         $names = $x509->getExtension('id-ce-subjectAltName');
43
-        if (! $names) {
43
+        if (!$names) {
44 44
             throw new \Exception('TLS client cert missing subject alternative names');
45 45
         }
46 46
         // Search subject alt names for user principal name
@@ -54,12 +54,12 @@  discard block
 block discarded – undo
54 54
                 }
55 55
             }
56 56
         }
57
-        if (! $upn) {
57
+        if (!$upn) {
58 58
             throw new \Exception('Could not find user principal name in TLS client cert');
59 59
         }
60 60
         $user_class = config('azure-oath.user_class');
61 61
         $user = $user_class::where('userPrincipalName', $upn)->first();
62
-        if (! $user) {
62
+        if (!$user) {
63 63
             throw new \Exception('No user found with user principal name '.$upn);
64 64
         }
65 65
         //dd($user);
Please login to merge, or discard this patch.
src/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.
src/OauthTokenGuard.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      */
58 58
     public function check()
59 59
     {
60
-        return ! is_null($this->user());
60
+        return !is_null($this->user());
61 61
     }
62 62
 
63 63
     /**
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      */
68 68
     public function guest()
69 69
     {
70
-        return ! $this->check();
70
+        return !$this->check();
71 71
     }
72 72
 
73 73
     /**
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     public function user()
79 79
     {
80
-        if (! is_null($this->user)) {
80
+        if (!is_null($this->user)) {
81 81
             return $this->user;
82 82
         }
83 83
     }
Please login to merge, or discard this patch.
src/UserFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 
40 40
     public static function userCallback($callback)
41 41
     {
42
-        if (! is_callable($callback)) {
42
+        if (!is_callable($callback)) {
43 43
             throw new \Exception('Must provide a callable.');
44 44
         }
45 45
 
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('azure-oath.routes.middleware')])->group(function () {
3
+Route::middleware([config('azure-oath.routes.middleware')])->group(function() {
4 4
     Route::get(config('azure-oath.routes.login'), 'Metrogistics\AzureSocialite\WebAuthController@redirectToOauthProvider');
5 5
     Route::get(config('azure-oath.routes.callback'), 'Metrogistics\AzureSocialite\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', 'Metrogistics\AzureSocialite\AuthController@loginOrRegister')->name('login');
10 10
     }
11
-    if (! \Route::has('register')) {
11
+    if (!\Route::has('register')) {
12 12
         Route::get('register', 'Metrogistics\AzureSocialite\AuthController@loginOrRegister')->name('register');
13 13
     }
14 14
 });
Please login to merge, or discard this patch.
publish/app/User.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,9 +7,9 @@
 block discarded – undo
7 7
 
8 8
 class User extends Authenticatable implements
9 9
     \Illuminate\Contracts\Auth\Authenticatable,
10
-                                              \Illuminate\Contracts\Auth\Access\Authorizable,
11
-                                              \Illuminate\Contracts\Auth\CanResetPassword,
12
-                                              \Tymon\JWTAuth\Contracts\JWTSubject
10
+                                                \Illuminate\Contracts\Auth\Access\Authorizable,
11
+                                                \Illuminate\Contracts\Auth\CanResetPassword,
12
+                                                \Tymon\JWTAuth\Contracts\JWTSubject
13 13
 {
14 14
     use Notifiable;
15 15
     use \Silber\Bouncer\Database\HasRolesAndAbilities;
Please login to merge, or discard this patch.
publish/routes/swagger.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 
7 7
     // Redirect requests to /api to the swagger documentation
8 8
     //$api->any('', function (Illuminate\Http\Request $request) {
9
-    $api->any('', function () {
9
+    $api->any('', function() {
10 10
         return redirect('api/documentation/');
11 11
     });
12 12
 
@@ -17,6 +17,6 @@  discard block
 block discarded – undo
17 17
      *     @SWG\Response(response="200", description="Hello world example")
18 18
      * )
19 19
      **/
20
-    $api->any('/api/hello', function () {
20
+    $api->any('/api/hello', function() {
21 21
         return 'hello world';
22 22
     });
Please login to merge, or discard this patch.