Passed
Push — master ( 29f0df...a04e7d )
by Iman
04:18
created
src/Hooks/EloquentHooks.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
     private function normalizeModel($target, array $model): array
42 42
     {
43 43
         $model = $this->normalizeInput($model);
44
-        $mapper = function ($model) use ($target) {
44
+        $mapper = function($model) use ($target) {
45 45
             return "eloquent.{$target}: {$model}";
46 46
         };
47 47
 
Please login to merge, or discard this patch.
src/Utils/GuardManager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
             $guardName = $model->guard_name ?? null;
19 19
         }
20 20
 
21
-        if (! isset($guardName)) {
21
+        if (!isset($guardName)) {
22 22
             $class = is_object($model) ? get_class($model) : $model;
23 23
 
24 24
             $guardName = (new \ReflectionClass($class))->getDefaultProperties()['guard_name'] ?? null;
@@ -29,14 +29,14 @@  discard block
 block discarded – undo
29 29
         }
30 30
 
31 31
         return collect(config('auth.guards'))
32
-            ->map(function ($guard) {
33
-                if (! isset($guard['provider'])) {
32
+            ->map(function($guard) {
33
+                if (!isset($guard['provider'])) {
34 34
                     return;
35 35
                 }
36 36
 
37 37
                 return config("auth.providers.{$guard['provider']}.model");
38 38
             })
39
-            ->filter(function ($model) use ($class) {
39
+            ->filter(function($model) use ($class) {
40 40
                 return $class === $model;
41 41
             })
42 42
             ->keys();
Please login to merge, or discard this patch.
src/YouShouldHave.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
             Gate::define($gate, $gate);
24 24
         }
25 25
 
26
-        $this->predicate = function () use ($gate, $args) {
26
+        $this->predicate = function() use ($gate, $args) {
27 27
             return Gate::allows($gate, $args);
28 28
         };
29 29
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     public function youShouldBeGuest()
34 34
     {
35
-        $this->predicate = function () {
35
+        $this->predicate = function() {
36 36
             return auth()->guest();
37 37
         };
38 38
 
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
     public function youShouldBeLoggedIn()
43 43
     {
44
-        $this->predicate = function () {
44
+        $this->predicate = function() {
45 45
             return auth()->check();
46 46
         };
47 47
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
     public function immediately()
52 52
     {
53
-        $this->predicate = function () {
53
+        $this->predicate = function() {
54 54
             return false;
55 55
         };
56 56
 
Please login to merge, or discard this patch.
src/RouteConditionApplier.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
             };
72 72
         }
73 73
 
74
-        return function () {
74
+        return function() {
75 75
         };
76 76
     }
77 77
 }
78 78
\ No newline at end of file
Please login to merge, or discard this patch.
src/Models/Role.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
         $role = static::where('id', $id)->where('guard_name', $guardName)->first();
18 18
 
19
-        if (! $role) {
19
+        if (!$role) {
20 20
             throw RoleDoesNotExist::withId($id);
21 21
         }
22 22
 
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
         $role = static::where('name', $name)->where('guard_name', $guardName)->first();
31 31
 
32
-        if (! $role) {
32
+        if (!$role) {
33 33
             throw RoleDoesNotExist::named($name);
34 34
         }
35 35
 
Please login to merge, or discard this patch.
src/Models/HasRoles.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,10 +13,10 @@  discard block
 block discarded – undo
13 13
     {
14 14
         $roles = collect($roles)
15 15
             ->flatten()
16
-            ->map(function ($role) {
16
+            ->map(function($role) {
17 17
                 return $this->getStoredRole($role);
18 18
             })
19
-            ->each(function ($role) {
19
+            ->each(function($role) {
20 20
                 $this->ensureModelSharesGuard($role);
21 21
             })
22 22
             ->all();
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
     protected function ensureModelSharesGuard($roleOrPermission)
101 101
     {
102
-        if (! $this->getGuardNames()->contains($roleOrPermission->guard_name)) {
102
+        if (!$this->getGuardNames()->contains($roleOrPermission->guard_name)) {
103 103
             throw GuardDoesNotMatch::create($roleOrPermission->guard_name, $this->getGuardNames());
104 104
         }
105 105
     }
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
             return explode('|', $pipeString);
120 120
         }
121 121
 
122
-        if (! in_array($quoteCharacter, ["'", '"'])) {
122
+        if (!in_array($quoteCharacter, ["'", '"'])) {
123 123
             return explode('|', $pipeString);
124 124
         }
125 125
 
Please login to merge, or discard this patch.
src/HeyManServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 
32 32
     private function defineGates(): void
33 33
     {
34
-        Gate::define('heyman.youShouldHaveRole', function ($user, $role) {
34
+        Gate::define('heyman.youShouldHaveRole', function($user, $role) {
35 35
             return $user->hasRole($role);
36 36
         });
37 37
     }
Please login to merge, or discard this patch.
src/Responder.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function view($view, $data = [], $status = 200, array $headers = [])
49 49
     {
50
-        $this->response = response()->view($view, $data, $status, $headers );
50
+        $this->response = response()->view($view, $data, $status, $headers);
51 51
     }
52 52
 
53 53
     /**
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      */
99 99
     public function streamDownload($callback, $name = null, array $headers = [], $disposition = 'attachment')
100 100
     {
101
-        $this->response = response()->streamDownload($callback, $name, $headers, $disposition );
101
+        $this->response = response()->streamDownload($callback, $name, $headers, $disposition);
102 102
     }
103 103
 
104 104
     /**
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      */
112 112
     public function download($file, $name = null, array $headers = [], $disposition = 'attachment')
113 113
     {
114
-        $this->response = response()->download($file, $name, $headers, $disposition );
114
+        $this->response = response()->download($file, $name, $headers, $disposition);
115 115
     }
116 116
 
117 117
     /**
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
      */
138 138
     public function redirectToAction($action, $parameters = [], $status = 302, $headers = [])
139 139
     {
140
-        $this->response = response()->redirectToAction($action, $parameters, $status, $headers );
140
+        $this->response = response()->redirectToAction($action, $parameters, $status, $headers);
141 141
     }
142 142
 
143 143
     /**
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
      */
164 164
     public function redirectToIntended($default = '/', $status = 302, $headers = [], $secure = null)
165 165
     {
166
-        $this->response = response()->redirectToIntended($default, $status, $headers, $secure );
166
+        $this->response = response()->redirectToIntended($default, $status, $headers, $secure);
167 167
     }
168 168
 
169 169
     public function send(Response $response)
@@ -181,21 +181,21 @@  discard block
 block discarded – undo
181 181
 
182 182
         if ($this->exception) {
183 183
             $e = $this->exception;
184
-            return function () use ($e, $cb) {
184
+            return function() use ($e, $cb) {
185 185
                 if (!$cb()) {
186 186
                     throw $e;
187 187
                 }
188 188
             };
189 189
         }
190 190
 
191
-        return function () use ($resp, $cb) {
191
+        return function() use ($resp, $cb) {
192 192
             if (!$cb()) {
193 193
                 respondWith($resp);
194 194
             }
195 195
         };
196 196
     }
197 197
 
198
-    public function throwNew($exception, $message= '')
198
+    public function throwNew($exception, $message = '')
199 199
     {
200 200
         $this->exception = new $exception($message);
201 201
     }
Please login to merge, or discard this patch.
src/migrations/2018_07_04_130611_create_user_roles_table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
         $tableNames['roles'] = 'roles';
19 19
         $tableNames['model_has_roles'] = 'model_has_roles';
20 20
 
21
-        Schema::create($tableNames['roles'], function (Blueprint $table) {
21
+        Schema::create($tableNames['roles'], function(Blueprint $table) {
22 22
             $table->increments('id');
23 23
             $table->string('name');
24 24
             $table->string('guard_name');
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         });
27 27
 
28 28
 
29
-        Schema::create($tableNames['model_has_roles'], function (Blueprint $table) use ($tableNames) {
29
+        Schema::create($tableNames['model_has_roles'], function(Blueprint $table) use ($tableNames) {
30 30
             $table->unsignedInteger('role_id');
31 31
             $table->morphs('model');
32 32
 
Please login to merge, or discard this patch.