Passed
Branch master (3b38dd)
by meta
04:06
created
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 3
 Route::middleware([config('azure-oath.routes.middleware')])->group(function() {
4
-    Route::get(config('azure-oath.routes.login'   ), 'Metrogistics\AzureSocialite\WebAuthController@redirectToOauthProvider');
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.
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.
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
 
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
      * )
19 19
      **/
20 20
 
21
-    $api->any('/api/hello', function () {
21
+    $api->any('/api/hello', function() {
22 22
         return 'hello world';
23 23
     });
24 24
 
Please login to merge, or discard this patch.
publish/routes/api.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
  * )
26 26
  **/
27 27
 
28
-Route::middleware('api')->get('/hello', function (Request $request) {
28
+Route::middleware('api')->get('/hello', function(Request $request) {
29 29
     return 'hello world';
30 30
 });
31 31
 
Please login to merge, or discard this patch.
publish/app/User.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@  discard block
 block discarded – undo
6 6
 use Illuminate\Foundation\Auth\User as Authenticatable;
7 7
 
8 8
 class User extends Authenticatable implements \Illuminate\Contracts\Auth\Authenticatable,
9
-                                              \Illuminate\Contracts\Auth\Access\Authorizable,
10
-                                              \Illuminate\Contracts\Auth\CanResetPassword,
11
-                                              \Tymon\JWTAuth\Contracts\JWTSubject
9
+                                                \Illuminate\Contracts\Auth\Access\Authorizable,
10
+                                                \Illuminate\Contracts\Auth\CanResetPassword,
11
+                                                \Tymon\JWTAuth\Contracts\JWTSubject
12 12
 {
13 13
     use Notifiable;
14 14
     use \Silber\Bouncer\Database\HasRolesAndAbilities;
@@ -32,16 +32,16 @@  discard block
 block discarded – undo
32 32
     ];
33 33
 
34 34
     /**
35
-    * @return mixed
36
-    */
35
+     * @return mixed
36
+     */
37 37
     public function getJWTIdentifier()
38 38
     {
39 39
         return $this->getKey();
40 40
     }
41 41
 
42 42
     /**
43
-    * @return array
44
-    */
43
+     * @return array
44
+     */
45 45
     public function getJWTCustomClaims()
46 46
     {
47 47
         return ['user' => ['id' => $this->id]];
Please login to merge, or discard this patch.
src/UserFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,13 +22,13 @@  discard block
 block discarded – undo
22 22
         $new_user->$id_field = $azure_user->id;
23 23
         //$new_user->password = bcrypt('');
24 24
 
25
-        foreach($user_map as $azure_field => $user_field){
25
+        foreach ($user_map as $azure_field => $user_field) {
26 26
             $new_user->$user_field = $azure_user->$azure_field;
27 27
         }
28 28
 
29 29
         $callback = static::$user_callback;
30 30
 
31
-        if($callback && is_callable($callback)){
31
+        if ($callback && is_callable($callback)) {
32 32
             $callback($new_user);
33 33
         }
34 34
 
@@ -39,7 +39,7 @@  discard block
 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.
src/Middleware/Authenticate.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
      */
57 57
     public function user()
58 58
     {
59
-        if($this->user){
59
+        if ($this->user) {
60 60
             return $this->user;
61 61
         }
62 62
 
Please login to merge, or discard this patch.
src/OauthTokenGuard.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
      * Get the ID for the currently authenticated user.
99 99
      *
100 100
      * @return string|null
101
-    */
101
+     */
102 102
     public function id()
103 103
     {
104 104
         if ($user = $this->user()) {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function check()
58 58
     {
59
-        return ! is_null($this->user());
59
+        return !is_null($this->user());
60 60
     }
61 61
 
62 62
     /**
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public function guest()
68 68
     {
69
-        return ! $this->check();
69
+        return !$this->check();
70 70
     }
71 71
 
72 72
     /**
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function user()
78 78
     {
79
-        if (! is_null($this->user)) {
79
+        if (!is_null($this->user)) {
80 80
             return $this->user;
81 81
         }
82 82
     }
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      *
112 112
      * @return bool
113 113
      */
114
-    public function validate(Array $credentials=[])
114
+    public function validate(Array $credentials = [])
115 115
     {
116 116
         return is_null($this->user);
117 117
     }
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
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
             $azureadgroups = $this->getUserGroupsByToken($token);
61 61
             // only proceed if we got a good response with group info
62 62
             if (isset($azureadgroups['value']) && count($azureadgroups['value'])) {
63
-                foreach($azureadgroups['value'] as $group) {
63
+                foreach ($azureadgroups['value'] as $group) {
64 64
                     $groups[] = $group['displayName'];
65 65
                 }
66 66
             }
Please login to merge, or discard this patch.