Passed
Push — master ( e1f169...671bd8 )
by Dan Michael O.
02:49
created
app/Http/Controllers/ThingsController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
             ->orderBy(\DB::raw("things.properties::json#>>'{name,nob}'"))
49 49
             ->get();
50 50
 
51
-        $things = $things->map(function ($thing) use ($libraryId) {
51
+        $things = $things->map(function($thing) use ($libraryId) {
52 52
             $all = $thing->items->whereNotIn('barcode', [null]);
53
-            $avail = $all->filter(function (Item $item) {
53
+            $avail = $all->filter(function(Item $item) {
54 54
                 return is_null($item->activeLoan);
55 55
             });
56 56
             $mine = $all->where('library_id', $libraryId);
@@ -96,12 +96,12 @@  discard block
 block discarded – undo
96 96
         $things = $things->orderBy(\DB::raw("things.properties::json#>>'{name,nob}'"))->get();
97 97
 
98 98
         if ($request->input('withoutBarcode')) {
99
-            $things = $things->filter(function ($thing) {
99
+            $things = $things->filter(function($thing) {
100 100
                 return $thing->library_settings->loans_without_barcode;
101 101
             })->values();
102 102
         }
103 103
 
104
-        $things = $things->map(function ($thing) {
104
+        $things = $things->map(function($thing) {
105 105
             return [
106 106
                 'id' => $thing->id,
107 107
                 'type' => 'thing',
Please login to merge, or discard this patch.
app/Http/Controllers/PublicApiController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
         if ($request->items && strtolower($request->items) !== 'false') {
94 94
             $query->with([
95
-                'items' => function ($query) use ($request) {
95
+                'items' => function($query) use ($request) {
96 96
                     if (isset($request->library)) {
97 97
                         $query->where('library_id', '=', $request->library);
98 98
                     }
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         }
104 104
 
105 105
         if (isset($request->library)) {
106
-            $query->whereHas('items', function ($itemQuery) use ($request) {
106
+            $query->whereHas('items', function($itemQuery) use ($request) {
107 107
                 $itemQuery->where('library_id', '=', $request->library);
108 108
             });
109 109
         }
Please login to merge, or discard this patch.