Completed
Pull Request — master (#5)
by claudio
11:05 queued 03:52
created
app/Group.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,9 @@
 block discarded – undo
51 51
 
52 52
     public function getPlannerNameAttribute()
53 53
     {
54
-        if(is_object($this->planner) && $this->planner->exists)
55
-            return $this->planner->name;
54
+        if(is_object($this->planner) && $this->planner->exists) {
55
+                    return $this->planner->name;
56
+        }
56 57
     }
57 58
 
58 59
     /**
Please login to merge, or discard this patch.
app/Http/Controllers/Companies/Groups/EmployeesController.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,8 +71,9 @@
 block discarded – undo
71 71
         $employee = Employee::findOrFail($employeeId);
72 72
         $this->authorize($employee);
73 73
         $group = Group::findOrFail($groupId);
74
-        if(!$employee->belongsToGroup($group))
75
-            return Response::json(['error' => 'employId <> groupId'],404);
74
+        if(!$employee->belongsToGroup($group)) {
75
+                    return Response::json(['error' => 'employId <> groupId'],404);
76
+        }
76 77
         $employee->groups()->detach($groupId);
77 78
         return $group->employees;
78 79
     }
Please login to merge, or discard this patch.
app/Http/Controllers/Companies/Employees/EmployeesController.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,8 +53,9 @@  discard block
 block discarded – undo
53 53
         //
54 54
         $company = \Auth::user();
55 55
         $input = $request->all();
56
-        if(isset($input['password']))
57
-            $input['password'] = bcrypt($input['password']);
56
+        if(isset($input['password'])) {
57
+                    $input['password'] = bcrypt($input['password']);
58
+        }
58 59
         $employee = $company->employees()->create($input);
59 60
         return $employee;
60 61
     }
@@ -86,8 +87,9 @@  discard block
 block discarded – undo
86 87
         $employee = Employee::findOrFail($id);
87 88
         $this->authorize($employee);
88 89
         $input = $request->all();
89
-        if(isset($input['password']))
90
-            $input['password'] = bcrypt($input['password']);
90
+        if(isset($input['password'])) {
91
+                    $input['password'] = bcrypt($input['password']);
92
+        }
91 93
         $employee->update($input);
92 94
         return $employee;
93 95
     }
Please login to merge, or discard this patch.
app/Employee.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -112,8 +112,9 @@  discard block
 block discarded – undo
112 112
         $caller = explode('\\', $caller['class']);
113 113
 
114 114
         //check if this function is called by email sender
115
-        if ($caller[count($caller) - 1] == 'PasswordBroker')
116
-            return $this->email;
115
+        if ($caller[count($caller) - 1] == 'PasswordBroker') {
116
+                    return $this->email;
117
+        }
117 118
         //return unique identify for token repository
118 119
         return $this->email . $this->company->id;
119 120
     }
@@ -125,8 +126,9 @@  discard block
 block discarded – undo
125 126
     public function belongsToGroup(Group $group)
126 127
     {
127 128
         $group = $this->groups()->where('id', $group->id)->first();
128
-        if(is_object($group) && $group->exists)
129
-            return true;
129
+        if(is_object($group) && $group->exists) {
130
+                    return true;
131
+        }
130 132
         return false;
131 133
     }
132 134
 
Please login to merge, or discard this patch.