Completed
Push — master ( 0d39ab...d6d294 )
by Eliurkis
01:28 queued 01:25
created
src/CrudController.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
     public function edit($id)
116 116
     {
117
-        if (! $this->entityInstance) {
117
+        if (!$this->entityInstance) {
118 118
             $this->entityInstance = $this->entity->findOrFail($id);
119 119
         }
120 120
 
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
         if ($request->get('q') != '') {
259 259
             $searchableCols = isset($this->searchable['columns']) ? $this->searchable['columns'] : $this->searchable;
260 260
 
261
-            $entity = $entity->where(function (Builder $query) use ($request, $searchableCols) {
261
+            $entity = $entity->where(function(Builder $query) use ($request, $searchableCols) {
262 262
                 foreach ($searchableCols as $field) {
263 263
                     $query->orWhere($field, 'like', '%'.$request->get('q').'%');
264 264
                 }
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
         $links = ['index', 'create', 'store'];
333 333
 
334 334
         foreach ($links as $link) {
335
-            if (! isset($this->links[$link])) {
335
+            if (!isset($this->links[$link])) {
336 336
                 $this->links[$link] = route($this->route.'.'.$link);
337 337
             }
338 338
         }
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
         $config['cols'] = isset($config['cols']) ? $config['cols'] : 1;
377 377
 
378 378
         // Get foreign values
379
-        if (! count($config['options']) && isset($config['entity'])) {
379
+        if (!count($config['options']) && isset($config['entity'])) {
380 380
             $config['options'] = $config['entity']::get()
381 381
                 ->lists($config['field_value'], $config['field_key'])
382 382
                 ->toArray();
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
     protected function prepareField($name, $properties = [])
409 409
     {
410 410
         // Init
411
-        if (! $properties) {
411
+        if (!$properties) {
412 412
             $properties = $this->fields[$name];
413 413
         }
414 414
 
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
 
426 426
         // Define field type class namespace
427 427
         $className = '\Eliurkis\Crud\FieldTypes\\'.ucfirst($properties['type']);
428
-        if (! class_exists($className)) {
428
+        if (!class_exists($className)) {
429 429
             return;
430 430
         }
431 431
 
Please login to merge, or discard this patch.
Unused Use Statements   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,11 +2,11 @@
 block discarded – undo
2 2
 
3 3
 namespace Eliurkis\Crud;
4 4
 
5
-use DB;
6
-use Illuminate\Http\Request;
7 5
 use App\Http\Controllers\Controller;
8
-use Illuminate\Database\Query\Builder;
6
+use DB;
9 7
 use Illuminate\Database\QueryException;
8
+use Illuminate\Database\Query\Builder;
9
+use Illuminate\Http\Request;
10 10
 
11 11
 class CrudController extends Controller
12 12
 {
Please login to merge, or discard this patch.