Completed
Push — master ( e792c1...df17fb )
by claudio
03:48
created
migrations/2015_11_17_140639_create_password_resets_employees_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
      */
13 13
     public function up()
14 14
     {
15
-        Schema::create('password_resets_employees', function (Blueprint $table) {
15
+        Schema::create('password_resets_employees', function(Blueprint $table) {
16 16
             $table->string('email')->index();
17 17
             $table->string('token')->index();
18 18
             $table->timestamp('created_at');
Please login to merge, or discard this patch.
database/migrations/2015_11_17_150653_create_groups_table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
      */
13 13
     public function up()
14 14
     {
15
-        Schema::create('groups', function (Blueprint $table) {
15
+        Schema::create('groups', function(Blueprint $table) {
16 16
             $table->increments('id');
17 17
             $table->timestamps();
18 18
             $table->string('name');
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
             $table->foreign('company_id')->references('id')->on('companies')->onDelete('cascade')->onUpdate('cascade');
22 22
             $table->integer('planner_id')->unsigned();
23 23
             $table->foreign('planner_id')->references('id')->on('employees')->onDelete('cascade')->onUpdate('cascade');
24
-            $table->unique(['name', 'company_id']);
24
+            $table->unique([ 'name', 'company_id' ]);
25 25
         });
26 26
     }
27 27
 
Please login to merge, or discard this patch.
database/migrations/2015_11_17_160832_create_pivot_employee_groups.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,12 +12,12 @@
 block discarded – undo
12 12
      */
13 13
     public function up()
14 14
     {
15
-        Schema::create('employee_groups', function (Blueprint $table) {
15
+        Schema::create('employee_groups', function(Blueprint $table) {
16 16
             $table->integer('employee_id')->unsigned();
17 17
             $table->foreign('employee_id')->references('id')->on('employees')->onDelete('cascade')->onUpdate('cascade');
18 18
             $table->integer('group_id')->unsigned();
19 19
             $table->foreign('group_id')->references('id')->on('groups')->onDelete('cascade')->onUpdate('cascade');
20
-            $table->unique(['employee_id', 'group_id']);
20
+            $table->unique([ 'employee_id', 'group_id' ]);
21 21
         });
22 22
     }
23 23
 
Please login to merge, or discard this patch.
database/seeds/InitSeeder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,14 +33,14 @@
 block discarded – undo
33 33
 
34 34
     static private function company()
35 35
     {
36
-        factory(plunner\Company::class, 10)->create()->each(function ($company) {
36
+        factory(plunner\Company::class, 10)->create()->each(function($company) {
37 37
             self::employees($company);
38 38
         });
39 39
     }
40 40
 
41 41
     static private function employees($company)
42 42
     {
43
-        factory(plunner\Employee::class, 3)->make()->each(function ($employee) use($company){
43
+        factory(plunner\Employee::class, 3)->make()->each(function($employee) use($company){
44 44
             $company->employees()->save($employee);
45 45
         });
46 46
     }
Please login to merge, or discard this patch.
resources/lang/en/validation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,6 +104,6 @@
 block discarded – undo
104 104
     |
105 105
     */
106 106
 
107
-    'attributes' => [],
107
+    'attributes' => [ ],
108 108
 
109 109
 ];
Please login to merge, or discard this patch.
server.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
  */
9 9
 
10 10
 $uri = urldecode(
11
-    parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
11
+    parse_url($_SERVER[ 'REQUEST_URI' ], PHP_URL_PATH)
12 12
 );
13 13
 
14 14
 // This file allows us to emulate Apache's "mod_rewrite" functionality from the
Please login to merge, or discard this patch.
app/Http/Controllers/Employees/EmployeesController.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,6 @@
 block discarded – undo
3 3
 namespace plunner\Http\Controllers\Employees;
4 4
 
5 5
 use Illuminate\Http\Request;
6
-
7
-use plunner\Http\Requests;
8 6
 use plunner\Http\Controllers\Controller;
9 7
 
10 8
 class GroupsController extends Controller
Please login to merge, or discard this patch.
app/Company.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,14 +51,14 @@
 block discarded – undo
51 51
      *
52 52
      * @var array
53 53
      */
54
-    protected $fillable = ['name', 'email', 'password'];
54
+    protected $fillable = [ 'name', 'email', 'password' ];
55 55
 
56 56
     /**
57 57
      * The attributes excluded from the model's JSON form.
58 58
      *
59 59
      * @var array
60 60
      */
61
-    protected $hidden = ['password', 'remember_token'];
61
+    protected $hidden = [ 'password', 'remember_token' ];
62 62
 
63 63
     public function company()
64 64
     {
Please login to merge, or discard this patch.
app/Http/Middleware/GetUserAndRefresh.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,6 @@
 block discarded – undo
9 9
 use plunner\Http\Controllers\Controller;
10 10
 use Tymon\JWTAuth\Support\auth\AuthenticatesAndRegistersUsers;
11 11
 use Tymon\JWTAuth\Support\auth\ThrottlesLogins;
12
-use Log;
13 12
 
14 13
 class AuthController extends Controller
15 14
 {
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -21,25 +21,25 @@  discard block
 block discarded – undo
21 21
     public function handle($request, \Closure $next, $custom = '')
22 22
     {
23 23
         $custom = $this->convertToArray($custom);
24
-        Debug::info('headers: '.implode('-',$request->all()));
25
-        if($token = $this->auth->setRequest($request)->getToken()) {
26
-        }else if ($this->auth->getUserModel()){
24
+        Debug::info('headers: '.implode('-', $request->all()));
25
+        if ($token = $this->auth->setRequest($request)->getToken()) {
26
+        } else if ($this->auth->getUserModel()) {
27 27
             $token = $this->auth->fromUser($this->auth->getUserModel(), $custom);
28
-        }else {
28
+        } else {
29 29
             return $this->respond('tymon.jwt.absent', 'token_not_provided', 401);
30 30
         }
31 31
 
32 32
         try {
33 33
             $user = $this->auth->authenticate($token, $custom);
34 34
         } catch (TokenExpiredException $e) {
35
-            return $this->respond('tymon.jwt.expired', 'token_expired', $e->getStatusCode(), [$e]);
36
-        } catch(InvalidClaimException $e) {
37
-            return $this->respond('tymon.jwt.invalid', 'claim_invalid', $e->getStatusCode(), [$e]);
35
+            return $this->respond('tymon.jwt.expired', 'token_expired', $e->getStatusCode(), [ $e ]);
36
+        } catch (InvalidClaimException $e) {
37
+            return $this->respond('tymon.jwt.invalid', 'claim_invalid', $e->getStatusCode(), [ $e ]);
38 38
         } catch (JWTException $e) {
39
-            return $this->respond('tymon.jwt.invalid', 'token_invalid', $e->getStatusCode(), [$e]);
39
+            return $this->respond('tymon.jwt.invalid', 'token_invalid', $e->getStatusCode(), [ $e ]);
40 40
         }
41 41
 
42
-        if (! $user) {
42
+        if (!$user) {
43 43
             return $this->respond('tymon.jwt.user_not_found', 'user_not_found', 404);
44 44
         }
45 45
 
@@ -55,13 +55,13 @@  discard block
 block discarded – undo
55 55
         try {
56 56
             $newToken = $this->auth->refresh($token, $custom);
57 57
         } catch (TokenExpiredException $e) {
58
-            return $this->respond('tymon.jwt.expired', 'token_expired', $e->getStatusCode(), [$e]);
58
+            return $this->respond('tymon.jwt.expired', 'token_expired', $e->getStatusCode(), [ $e ]);
59 59
         } catch (JWTException $e) {
60
-            return $this->respond('tymon.jwt.invalid', 'token_invalid', $e->getStatusCode(), [$e]);
60
+            return $this->respond('tymon.jwt.invalid', 'token_invalid', $e->getStatusCode(), [ $e ]);
61 61
         }
62 62
 
63 63
         // send the refreshed token back to the client
64
-        $response->headers->set('Authorization', 'Bearer ' . $newToken);
64
+        $response->headers->set('Authorization', 'Bearer '.$newToken);
65 65
 
66 66
         return $response;
67 67
     }
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,9 +23,9 @@
 block discarded – undo
23 23
         $custom = $this->convertToArray($custom);
24 24
         Debug::info('headers: '.implode('-',$request->all()));
25 25
         if($token = $this->auth->setRequest($request)->getToken()) {
26
-        }else if ($this->auth->getUserModel()){
26
+        } else if ($this->auth->getUserModel()){
27 27
             $token = $this->auth->fromUser($this->auth->getUserModel(), $custom);
28
-        }else {
28
+        } else {
29 29
             return $this->respond('tymon.jwt.absent', 'token_not_provided', 401);
30 30
         }
31 31
 
Please login to merge, or discard this patch.