Passed
Push — master ( f51c1b...16736d )
by Arthur
05:36
created
bootstrap/app.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
     Illuminate\Contracts\Debug\ExceptionHandler::class,
46 46
     \Foundation\Kernels\ExceptionKernel::class
47 47
 );
48
-$app->bind(\Auth0\Login\Contract\Auth0UserRepository::class, function () {
48
+$app->bind(\Auth0\Login\Contract\Auth0UserRepository::class, function() {
49 49
     return new Auth0Service(new UserService());
50 50
 });
51 51
 /*
Please login to merge, or discard this patch.
src/Modules/Auth0/Providers/Auth0ServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,11 +31,11 @@
 block discarded – undo
31 31
      */
32 32
     public function boot()
33 33
     {
34
-        $this->app->bind(\Auth0\Login\Contract\Auth0UserRepository::class, function () {
34
+        $this->app->bind(\Auth0\Login\Contract\Auth0UserRepository::class, function() {
35 35
             return new Auth0Service(new UserService());
36 36
         });
37 37
 
38
-        $this->app->bind(Auth0ServiceContract::class, function () {
38
+        $this->app->bind(Auth0ServiceContract::class, function() {
39 39
             return new Auth0Service(new UserService());
40 40
         });
41 41
     }
Please login to merge, or discard this patch.
src/Modules/Auth0/Services/Auth0Service.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
     public function getUserByUserInfo($userInfo)
51 51
     {
52
-        return $this->upsertUser($userInfo['profile']);
52
+        return $this->upsertUser($userInfo[ 'profile' ]);
53 53
     }
54 54
 
55 55
     protected function upsertUser($profile)
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
             throw new BadRequestHttpException('Missing token information: Auth0 user id is not set');
59 59
         }
60 60
         $identifier = explode('|', $profile->user_id);
61
-        $identityProvider = $identifier[0];
62
-        $id = $identifier[1];
61
+        $identityProvider = $identifier[ 0 ];
62
+        $id = $identifier[ 1 ];
63 63
 
64 64
         $user = $this->service->findByIdentityId($id);
65 65
         if ($user === null) {
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
     public function getTestUserToken()
97 97
     {
98
-        return Cache::remember('testing:http_access_token', 60, function () {
98
+        return Cache::remember('testing:http_access_token', 60, function() {
99 99
             try {
100 100
                 $httpClient = new Client();
101 101
                 $response = $httpClient->post(env('AUTH0_DOMAIN').'oauth/token', [
Please login to merge, or discard this patch.
src/Modules/Demo/Jobs/SeedDemoDataJob.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 {
19 19
     public function handle()
20 20
     {
21
-        Model::unguarded(function () {
21
+        Model::unguarded(function() {
22 22
             $seeder = app()->make(DemoSeeder::class);
23 23
             $seeder->__invoke();
24 24
         });
Please login to merge, or discard this patch.
src/Modules/Notification/Services/NotificationService.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
 
44 44
     public function allNotificationsByUser($user)
45 45
     {
46
-       return $this->user->find($user)->notifications;
46
+        return $this->user->find($user)->notifications;
47 47
     }
48 48
 
49 49
     public function unreadNotifcationsByUser($user)
Please login to merge, or discard this patch.
src/Modules/User/Entities/User.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,12 +40,12 @@
 block discarded – undo
40 40
      */
41 41
     protected $table = 'users';
42 42
 
43
-    protected $with = ['roles','permissions'];
43
+    protected $with = [ 'roles', 'permissions' ];
44 44
 
45 45
     /**
46 46
      * @var array
47 47
      */
48
-    protected $guarded = [];
48
+    protected $guarded = [ ];
49 49
 
50 50
     /**
51 51
      * @return mixed
Please login to merge, or discard this patch.
src/Modules/User/Resources/UserResource.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
             'created_at'       => $this->created_at,
34 34
             'updated_at'       => $this->updated_at,
35 35
             'roles'            => collect(RoleResource::collection($this->roles)->toArray(null))->flatten(),
36
-            'permissions'      => collect(PermissionResource::collection($this->getAllPermissions() )->toArray(null))->flatten()
36
+            'permissions'      => collect(PermissionResource::collection($this->getAllPermissions())->toArray(null))->flatten()
37 37
         ];
38 38
     }
39 39
 }
Please login to merge, or discard this patch.
src/Modules/User/Services/UserService.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
     public function setRoles($id, array $roles): void
71 71
     {
72 72
         if (!in_array(Role::USER, $roles))
73
-            $roles[] = Role::USER;
73
+            $roles[ ] = Role::USER;
74 74
         $this->find($id)->syncRoles($roles);
75 75
     }
76 76
 }
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,13 +22,15 @@  discard block
 block discarded – undo
22 22
 
23 23
     public function find($id): ?User
24 24
     {
25
-        if ($id instanceof User)
26
-            return $id;
25
+        if ($id instanceof User) {
26
+                    return $id;
27
+        }
27 28
 
28 29
         $user = User::find($id);
29 30
 
30
-        if ($user === null)
31
-            throw new NotFoundHttpException();
31
+        if ($user === null) {
32
+                    throw new NotFoundHttpException();
33
+        }
32 34
 
33 35
         return $user;
34 36
     }
@@ -69,8 +71,9 @@  discard block
 block discarded – undo
69 71
 
70 72
     public function setRoles($id, array $roles): void
71 73
     {
72
-        if (!in_array(Role::USER, $roles))
73
-            $roles[] = Role::USER;
74
+        if (!in_array(Role::USER, $roles)) {
75
+                    $roles[] = Role::USER;
76
+        }
74 77
         $this->find($id)->syncRoles($roles);
75 78
     }
76 79
 }
Please login to merge, or discard this patch.
src/Modules/Machine/Contracts/MachineServiceContract.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,5 +22,5 @@
 block discarded – undo
22 22
 
23 23
     public function delete($id): bool;
24 24
 
25
-    public function heartbeat($id,$data): void;
25
+    public function heartbeat($id, $data): void;
26 26
 }
Please login to merge, or discard this patch.