Passed
Pull Request — master (#5)
by
unknown
03:01
created
src/Detector.php 1 patch
Braces   +24 added lines, -8 removed lines patch added patch discarded remove patch
@@ -89,7 +89,9 @@  discard block
 block discarded – undo
89 89
 
90 90
         // First we need to check restritions for given Role
91 91
         // to detect special Location, IP, Hours conditions.
92
-        if (! $this->checkRestrictions()) return $this->denied;
92
+        if (! $this->checkRestrictions()) {
93
+            return $this->denied;
94
+        }
93 95
 
94 96
         return $this->hasModel($model, $relation) ? $this->allowed: $this->denied;
95 97
     }
@@ -108,9 +110,13 @@  discard block
 block discarded – undo
108 110
 
109 111
         // First we need to check restritions for given Role
110 112
         // to detect special Location, IP, Hours conditions.
111
-        if (! $this->checkRestrictions()) return $this->denied;
113
+        if (! $this->checkRestrictions()) {
114
+            return $this->denied;
115
+        }
112 116
 
113
-        if ($this->hasModel($model, $relation)) return $this->allowed;
117
+        if ($this->hasModel($model, $relation)) {
118
+            return $this->allowed;
119
+        }
114 120
 
115 121
         return $this->hasLevel($min) ? $this->allowed : $this->denied;
116 122
     }
@@ -128,7 +134,9 @@  discard block
 block discarded – undo
128 134
 
129 135
         // First we need to check restritions for given Role
130 136
         // to detect special Location, IP, Hours conditions.
131
-        if (! $this->checkRestrictions()) return $this->denied;
137
+        if (! $this->checkRestrictions()) {
138
+            return $this->denied;
139
+        }
132 140
 
133 141
         return $this->hasLevel($min) ? $this->allowed : $this->denied;
134 142
     }
@@ -147,7 +155,9 @@  discard block
 block discarded – undo
147 155
 
148 156
         // First we need to check restritions for given Role
149 157
         // to detect special Location, IP, Hours conditions.
150
-        if (! $this->checkRestrictions()) return $this->denied;
158
+        if (! $this->checkRestrictions()) {
159
+            return $this->denied;
160
+        }
151 161
 
152 162
         return $this->isOwner($model, $foreign) ? $this->allowed : $this->denied;
153 163
     }
@@ -167,9 +177,13 @@  discard block
 block discarded – undo
167 177
 
168 178
         // First we need to check restritions for given Role
169 179
         // to detect special Location, IP, Hours conditions.
170
-        if (! $this->checkRestrictions()) return $this->denied;
180
+        if (! $this->checkRestrictions()) {
181
+            return $this->denied;
182
+        }
171 183
 
172
-        if ($this->isOwner($model, $foreign)) return $this->allowed;
184
+        if ($this->isOwner($model, $foreign)) {
185
+            return $this->allowed;
186
+        }
173 187
 
174 188
         return $this->hasLevel($min) ? $this->allowed : $this->denied;
175 189
     }
@@ -202,7 +216,9 @@  discard block
 block discarded – undo
202 216
 
203 217
         // First we need to check restritions for given Role
204 218
         // to detect special Location, IP, Hours conditions.
205
-        if (! $this->checkRestrictions()) return $this->denied;
219
+        if (! $this->checkRestrictions()) {
220
+            return $this->denied;
221
+        }
206 222
 
207 223
         return $this->isSharing($model, $modelRelation, $relation) ?
208 224
             $this->allowed : $this->denied;
Please login to merge, or discard this patch.
database/migrations/2018_10_14_120002_create_priv_user_role_table.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,12 +34,12 @@
 block discarded – undo
34 34
             $table->unsignedInteger('role_id');
35 35
 
36 36
             $table->foreign('auth_id')
37
-                  ->references($config['key'])->on($config['table'])
38
-                  ->onDelete('CASCADE');
37
+                    ->references($config['key'])->on($config['table'])
38
+                    ->onDelete('CASCADE');
39 39
 
40 40
             $table->foreign('role_id')
41
-                  ->references('id')->on('priv_roles')
42
-                  ->onDelete('CASCADE');
41
+                    ->references('id')->on('priv_roles')
42
+                    ->onDelete('CASCADE');
43 43
         });
44 44
     }
45 45
 
Please login to merge, or discard this patch.