Completed
Push — master ( 19917c...6f13a5 )
by claudio
04:19
created
app/Meeting.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
      *
12 12
      * @var array
13 13
      */
14
-    protected $fillable = ['title', 'description', 'meeting_time'];
14
+    protected $fillable = [ 'title', 'description', 'meeting_time' ];
15 15
 
16 16
     public function employees()
17 17
     {
Please login to merge, or discard this patch.
app/Http/Controllers/Employees/EmployeesController.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Illuminate\Http\Request;
6 6
 
7
-use plunner\Http\Requests;
8 7
 use plunner\Http\Controllers\Controller;
9 8
 
10 9
 class GroupsController extends Controller
Please login to merge, or discard this patch.
app/Calendar.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
      *
12 12
      * @var array
13 13
      */
14
-    protected $fillable = ['name'];
14
+    protected $fillable = [ 'name' ];
15 15
 
16 16
     public function employees()
17 17
     {
Please login to merge, or discard this patch.
app/Timeslot.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
      *
12 12
      * @var array
13 13
      */
14
-    protected $fillable = ['time_start', 'time_end'];
14
+    protected $fillable = [ 'time_start', 'time_end' ];
15 15
 
16 16
     public function employees()
17 17
     {
Please login to merge, or discard this patch.
app/PolicyCheckable.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Created by PhpStorm.
4
- * User: Claudio Cardinale <[email protected]>
5
- * Date: 24/11/15
6
- * Time: 21.58
7
- * This program is free software; you can redistribute it and/or
8
- * modify it under the terms of the GNU General Public License
9
- * as published by the Free Software Foundation; either version 2
10
- * of the License, or (at your option) any later version.
11
- * This program is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
- * GNU General Public License for more details.
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program; if not, write to the Free Software
17
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18
- */
3
+     * Created by PhpStorm.
4
+     * User: Claudio Cardinale <[email protected]>
5
+     * Date: 24/11/15
6
+     * Time: 21.58
7
+     * This program is free software; you can redistribute it and/or
8
+     * modify it under the terms of the GNU General Public License
9
+     * as published by the Free Software Foundation; either version 2
10
+     * of the License, or (at your option) any later version.
11
+     * This program is distributed in the hope that it will be useful,
12
+     * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
+     * GNU General Public License for more details.
15
+     * You should have received a copy of the GNU General Public License
16
+     * along with this program; if not, write to the Free Software
17
+     * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18
+     */
19 19
 
20 20
 namespace plunner;
21 21
 
Please login to merge, or discard this patch.
app/Http/Controllers/Employees/GroupsController.php 1 patch
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -4,9 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Illuminate\Http\Request;
6 6
 
7
-use plunner\Group;
8
-use plunner\Employee;
9
-use plunner\Http\Requests;
10 7
 use plunner\Http\Controllers\Controller;
11 8
 
12 9
 class GroupsController extends Controller
Please login to merge, or discard this patch.
app/Employee.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
      *
47 47
      * @var string
48 48
      */
49
-     //protected $table = 'employees';
49
+        //protected $table = 'employees';
50 50
 
51 51
     /**
52 52
      * The attributes that are mass assignable.
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,14 +53,14 @@  discard block
 block discarded – undo
53 53
      *
54 54
      * @var array
55 55
      */
56
-    protected $fillable = ['name', 'email', 'password'];
56
+    protected $fillable = [ 'name', 'email', 'password' ];
57 57
 
58 58
     /**
59 59
      * The attributes excluded from the model's JSON form.
60 60
      *
61 61
      * @var array
62 62
      */
63
-    protected $hidden = ['password', 'remember_token'];
63
+    protected $hidden = [ 'password', 'remember_token' ];
64 64
 
65 65
     /**
66 66
      * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     public function belongsToGroup(Group $group)
115 115
     {
116 116
         $group = $this->groups()->where('id', $group->id)->first();
117
-        if(is_object($group) && $group->exists)
117
+        if (is_object($group) && $group->exists)
118 118
             return true;
119 119
         return false;
120 120
     }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -114,8 +114,9 @@
 block discarded – undo
114 114
     public function belongsToGroup(Group $group)
115 115
     {
116 116
         $group = $this->groups()->where('id', $group->id)->first();
117
-        if(is_object($group) && $group->exists)
118
-            return true;
117
+        if(is_object($group) && $group->exists) {
118
+                    return true;
119
+        }
119 120
         return false;
120 121
     }
121 122
 
Please login to merge, or discard this patch.
app/Group.php 2 patches
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.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,21 +37,21 @@
 block discarded – undo
37 37
      *
38 38
      * @var array
39 39
      */
40
-    protected $fillable = ['name', 'description', 'planner_id'];
40
+    protected $fillable = [ 'name', 'description', 'planner_id' ];
41 41
 
42 42
     /**
43 43
      * @var array
44 44
      */
45
-    protected $hidden = ['planner'];
45
+    protected $hidden = [ 'planner' ];
46 46
 
47 47
     /**
48 48
      * @var array
49 49
      */
50
-    protected $appends = ['planner_name'];
50
+    protected $appends = [ 'planner_name' ];
51 51
 
52 52
     public function getPlannerNameAttribute()
53 53
     {
54
-        if(is_object($this->planner) && $this->planner->exists)
54
+        if (is_object($this->planner) && $this->planner->exists)
55 55
             return $this->planner->name;
56 56
     }
57 57
 
Please login to merge, or discard this patch.
app/Http/Controllers/Companies/Groups/EmployeesController.php 3 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 namespace plunner\Http\Controllers\Companies\Groups;
4 4
 
5 5
 use Illuminate\Support\Facades\Response;
6
-use plunner\Group;
7 6
 use plunner\Employee;
7
+use plunner\Group;
8 8
 use plunner\Http\Controllers\Controller;
9 9
 use plunner\Http\Requests\Companies\Groups\EmployeeRequest;
10 10
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public function __construct()
23 23
     {
24
-        config(['auth.model' => \plunner\Company::class]);
25
-        config(['jwt.user' => \plunner\Company::class]);
24
+        config([ 'auth.model' => \plunner\Company::class ]);
25
+        config([ 'jwt.user' => \plunner\Company::class ]);
26 26
         $this->middleware('jwt.authandrefresh:mode-cn');
27 27
     }
28 28
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         //
54 54
         $group = Group::findOrFail($groupId);
55 55
         $this->authorize($group);
56
-        $id = $request->all()['id'];
56
+        $id = $request->all()[ 'id' ];
57 57
         $group->employees()->attach($id);
58 58
         return $group->employees;
59 59
     }
@@ -71,8 +71,8 @@  discard block
 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
         $employee->groups()->detach($groupId);
77 77
         return $group->employees;
78 78
     }
Please login to merge, or discard this 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.