Test Setup Failed
Push — master ( 783348...69f7f6 )
by Php Easy Api
04:06
created
src/resta/Role/Resource/Database/Permission.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
      */
17 17
     public static function permissionMake($routeName)
18 18
     {
19
-        $permission = static::where('route_name',$routeName)->where('role_id',auth()->user()->role_id);
19
+        $permission = static::where('route_name', $routeName)->where('role_id', auth()->user()->role_id);
20 20
         
21 21
         return ($permission->count()) ? true : false;
22 22
     }
Please login to merge, or discard this patch.
src/resta/Role/Resource/Database/Role.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -16,17 +16,17 @@
 block discarded – undo
16 16
      */
17 17
     public static function roleMake($role)
18 18
     {
19
-        $roleCriteria = explode(':',$role);
19
+        $roleCriteria = explode(':', $role);
20 20
         
21
-        if(isset($roleCriteria[1])){
22
-            $role = static::where('name',$roleCriteria[0])->
23
-            where('status',1)->where('is_deleted',0)->where('role_state',$roleCriteria[1])->first();
21
+        if (isset($roleCriteria[1])) {
22
+            $role = static::where('name', $roleCriteria[0])->
23
+            where('status', 1)->where('is_deleted', 0)->where('role_state', $roleCriteria[1])->first();
24 24
             
25
-            if(is_null($role)){
25
+            if (is_null($role)) {
26 26
                 exception('roleDefinitorException')->runtime('roleDefinitorException');
27 27
             }
28 28
             
29
-            if(auth()->user()->role_id == $role->id){
29
+            if (auth()->user()->role_id==$role->id) {
30 30
                 return true;
31 31
             }
32 32
             
Please login to merge, or discard this patch.
src/resta/Role/RoleManager.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -64,10 +64,10 @@  discard block
 block discarded – undo
64 64
         $permission = $this->getPermission();
65 65
         $role = $this->getRole();
66 66
         
67
-        if(is_null($this->role)){
67
+        if (is_null($this->role)) {
68 68
             return $permission::permissionMake($this->routeName);
69 69
         }
70
-        else{
70
+        else {
71 71
             return $role::roleMake($this->role);
72 72
         }
73 73
     }
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
      * @param string $adapter
105 105
      * @return RoleManager
106 106
      */
107
-    public function setAdapter($adapter='Database')
107
+    public function setAdapter($adapter = 'Database')
108 108
     {
109 109
         $this->adapter = $adapter;
110 110
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,8 +66,7 @@
 block discarded – undo
66 66
         
67 67
         if(is_null($this->role)){
68 68
             return $permission::permissionMake($this->routeName);
69
-        }
70
-        else{
69
+        } else{
71 70
             return $role::roleMake($this->role);
72 71
         }
73 72
     }
Please login to merge, or discard this patch.