Completed
Push — master ( fcdc06...2647f7 )
by Dan Michael O.
07:17
created
app/Http/Controllers/DocumentsController.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace Colligator\Http\Controllers;
4 4
 
5 5
 use Carbon\Carbon;
6
-use Colligator\Cover;
7 6
 use Colligator\Document;
8 7
 use Colligator\Http\Requests\SearchDocumentsRequest;
9 8
 use Colligator\Search\DocumentsIndex;
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             'event' => 'elasticsearch_request',
40 40
             'event_time' => Carbon::now(),
41 41
             'msecs' => round(($t1 - $t0) * 1000),
42
-            'data' => 'results:' . count($response['hits']['hits']),
42
+            'data' => 'results:'.count($response['hits']['hits']),
43 43
         ]);
44 44
         $hits = count($response['hits']['hits']);
45 45
         if ($response['offset'] + $hits < $out['total']) {
@@ -204,11 +204,11 @@  discard block
 block discarded – undo
204 204
                 $cover = $cover->toArray();
205 205
             }
206 206
         } catch (\ErrorException $e) {
207
-            \Log::error('Failed to cache cover, got error: ' . $e->getMessage());
207
+            \Log::error('Failed to cache cover, got error: '.$e->getMessage());
208 208
 
209 209
             return response()->json([
210 210
                 'result' => 'error',
211
-                'error'  => 'Failed to store the cover. Please check that the URL points to a valid image file. Details: ' . $e->getMessage(),
211
+                'error'  => 'Failed to store the cover. Please check that the URL points to a valid image file. Details: '.$e->getMessage(),
212 212
             ]);
213 213
         }
214 214
 
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
         ];
244 244
         $doc->save();
245 245
 
246
-        \Log::info('Stored new description for ' . $doc->id);
246
+        \Log::info('Stored new description for '.$doc->id);
247 247
 
248 248
         $se->indexById($doc->id);
249 249
 
@@ -268,11 +268,11 @@  discard block
 block discarded – undo
268 268
             $doc->save();
269 269
 
270 270
         } catch (\ErrorException $e) {
271
-            \Log::error('Failed to store status, got error: ' . $e->getMessage());
271
+            \Log::error('Failed to store status, got error: '.$e->getMessage());
272 272
 
273 273
             return response()->json([
274 274
                 'result' => 'error',
275
-                'error'  => 'Failed to store status. Details: ' . $e->getMessage(),
275
+                'error'  => 'Failed to store status. Details: '.$e->getMessage(),
276 276
             ]);
277 277
         }
278 278
 
Please login to merge, or discard this patch.