GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 984397...f88331 )
by Nikhil
09:07
created
app/Providers/EventServiceProvider.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -13,33 +13,33 @@
 block discarded – undo
13 13
      * @var array
14 14
      */
15 15
     protected $listen = [
16
-        'App\Events\MakeWasCreated' => [],
17
-        'App\Events\MakeWasDeleted' => [],
16
+        'App\Events\MakeWasCreated' => [ ],
17
+        'App\Events\MakeWasDeleted' => [ ],
18 18
 
19
-        'App\Events\ModelWasCreated' => [],
20
-        'App\Events\ModelWasDeleted' => [],
19
+        'App\Events\ModelWasCreated' => [ ],
20
+        'App\Events\ModelWasDeleted' => [ ],
21 21
 
22
-        'App\Events\WarehouseWasCreated' => [],
23
-        'App\Events\WarehouseWasUpdated' => [],
24
-        'App\Events\WarehouseWasDeleted' => [],
22
+        'App\Events\WarehouseWasCreated' => [ ],
23
+        'App\Events\WarehouseWasUpdated' => [ ],
24
+        'App\Events\WarehouseWasDeleted' => [ ],
25 25
 
26
-        'App\Events\SupplierWasCreated' => [],
27
-        'App\Events\SupplierWasDeleted' => [],
26
+        'App\Events\SupplierWasCreated' => [ ],
27
+        'App\Events\SupplierWasDeleted' => [ ],
28 28
 
29 29
         'App\Events\PurchaseWasCreated' => [
30 30
             'App\Listeners\GeneratePurchaseNotification',
31 31
         ],
32
-        'App\Events\PurchaseWasDeleted' => [],
32
+        'App\Events\PurchaseWasDeleted' => [ ],
33 33
 
34
-        'App\Events\GuitarWasCreated' => [],
35
-        'App\Events\GuitarWasUpdated' => [],
36
-        'App\Events\GuitarWasDeleted' => [],
34
+        'App\Events\GuitarWasCreated' => [ ],
35
+        'App\Events\GuitarWasUpdated' => [ ],
36
+        'App\Events\GuitarWasDeleted' => [ ],
37 37
 
38
-        'App\Events\SaleWasCreated' => [],
39
-        'App\Events\SaleWasDeleted' => [],
38
+        'App\Events\SaleWasCreated' => [ ],
39
+        'App\Events\SaleWasDeleted' => [ ],
40 40
 
41
-        'App\Events\NotificationWasCreated'   => [],
42
-        'App\Events\NotificationWasDismissed' => [],
41
+        'App\Events\NotificationWasCreated'   => [ ],
42
+        'App\Events\NotificationWasDismissed' => [ ],
43 43
     ];
44 44
 
45 45
     /**
Please login to merge, or discard this patch.
app/Http/Controllers/GuitarController.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -44,14 +44,14 @@  discard block
 block discarded – undo
44 44
     public function store($id, Request $request)
45 45
     {
46 46
         $purchase = Purchase::findOrFail($id);
47
-        if ( ! $purchase->hasArrived() || ! $purchase->isPendingStorage()) {
48
-            return response(['purchase' => ['The purchase has not yet arrived or doesn\'t require addition of guitars.']],
47
+        if (!$purchase->hasArrived() || !$purchase->isPendingStorage()) {
48
+            return response([ 'purchase' => [ 'The purchase has not yet arrived or doesn\'t require addition of guitars.' ] ],
49 49
                 422);
50 50
         }
51 51
 
52 52
         $this->validate($request, [
53
-            'rack_id'   => 'required|exists:racks,id,make_id,' . $purchase->make_id,
54
-            'model_id'  => 'required|exists:models,id,make_id,' . $purchase->make_id,
53
+            'rack_id'   => 'required|exists:racks,id,make_id,'.$purchase->make_id,
54
+            'model_id'  => 'required|exists:models,id,make_id,'.$purchase->make_id,
55 55
             'colour'    => 'required|string|max:255',
56 56
             'damaged'   => 'boolean',
57 57
             'condition' => 'required_if:damaged,true',
@@ -60,10 +60,10 @@  discard block
 block discarded – undo
60 60
 
61 61
         $rack = Rack::find($request->input('rack_id'));
62 62
         if ($rack->used >= $rack->capacity) {
63
-            return response(['rack_id' => ['The selected rack is full.']], 422);
63
+            return response([ 'rack_id' => [ 'The selected rack is full.' ] ], 422);
64 64
         }
65 65
 
66
-        $guitar = Guitar::create($request->only(['rack_id', 'model_id', 'colour', 'price']) + [
66
+        $guitar = Guitar::create($request->only([ 'rack_id', 'model_id', 'colour', 'price' ]) + [
67 67
                 'make_id'     => $purchase->make_id,
68 68
                 'purchase_id' => $purchase->id,
69 69
                 'damaged'     => $request->input('damaged'),
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
     {
86 86
         $guitar = Guitar::findOrFail($id);
87 87
         $this->validate($request, [
88
-            'rack_id'   => 'required|exists:racks,id,make_id,' . $guitar->make_id,
89
-            'model_id'  => 'required|exists:models,id,make_id,' . $guitar->make_id,
88
+            'rack_id'   => 'required|exists:racks,id,make_id,'.$guitar->make_id,
89
+            'model_id'  => 'required|exists:models,id,make_id,'.$guitar->make_id,
90 90
             'colour'    => 'required|string|max:255',
91 91
             'damaged'   => 'boolean',
92 92
             'condition' => 'required_if:damaged,true',
@@ -95,10 +95,10 @@  discard block
 block discarded – undo
95 95
 
96 96
         $rack = Rack::find($request->input('rack_id'));
97 97
         if ($rack->used >= $rack->capacity) {
98
-            return response(['rack_id' => ['The selected rack is full.']], 422);
98
+            return response([ 'rack_id' => [ 'The selected rack is full.' ] ], 422);
99 99
         }
100 100
 
101
-        $guitar->update($request->only(['rack_id', 'model_id', 'colour', 'price']) + [
101
+        $guitar->update($request->only([ 'rack_id', 'model_id', 'colour', 'price' ]) + [
102 102
                 'damaged'   => $request->input('damaged'),
103 103
                 'condition' => $request->input('damaged') ? $request->input('condition') : null
104 104
             ]);
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         $guitar = Guitar::findOrFail($id);
119 119
 
120 120
         if ($guitar->isSold()) {
121
-            return response(['guitar_id' => ['This guitar has already been sold.']], 422);
121
+            return response([ 'guitar_id' => [ 'This guitar has already been sold.' ] ], 422);
122 122
         }
123 123
 
124 124
         $this->validate($request, [
@@ -129,10 +129,10 @@  discard block
 block discarded – undo
129 129
 
130 130
         $shop = null;
131 131
         if ($request->input('customer_type') == 'shop') {
132
-            $shop = Shop::create($request->only(['name', 'address']))->id;
132
+            $shop = Shop::create($request->only([ 'name', 'address' ]))->id;
133 133
         }
134 134
 
135
-        $sale = Sale::create($request->only(['name', 'address']) + ['guitar_id' => $id, 'shop_id' => $shop]);
135
+        $sale = Sale::create($request->only([ 'name', 'address' ]) + [ 'guitar_id' => $id, 'shop_id' => $shop ]);
136 136
 
137 137
         event(new SaleWasCreated($sale));
138 138
     }
Please login to merge, or discard this patch.