Completed
Branch master (0d39ab)
by Eliurkis
06:55 queued 05:13
created
src/CrudController.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 
117 117
     public function edit($id)
118 118
     {
119
-        if (! $this->entityInstance) {
119
+        if (!$this->entityInstance) {
120 120
             $this->entityInstance = $this->entity->findOrFail($id);
121 121
         }
122 122
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
         if ($request->get('q') != '') {
245 245
             $searchableCols = isset($this->searchable['columns']) ? $this->searchable['columns'] : $this->searchable;
246 246
 
247
-            $entity = $entity->where(function ($query) use ($request, $searchableCols) {
247
+            $entity = $entity->where(function($query) use ($request, $searchableCols) {
248 248
                 foreach ($searchableCols as $field) {
249 249
                     $query->orWhere($field, 'like', '%'.$request->get('q').'%');
250 250
                 }
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
         $links = ['index', 'create', 'store'];
315 315
 
316 316
         foreach ($links as $link) {
317
-            if (! isset($this->links[$link])) {
317
+            if (!isset($this->links[$link])) {
318 318
                 $this->links[$link] = route($this->route.'.'.$link);
319 319
             }
320 320
         }
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
         $config['cols'] = isset($config['cols']) ? $config['cols'] : 1;
349 349
 
350 350
         // Get foreign values
351
-        if (! count($config['options']) && isset($config['entity'])) {
351
+        if (!count($config['options']) && isset($config['entity'])) {
352 352
             $config['options'] = $config['entity']::get()
353 353
                 ->lists($config['field_value'], $config['field_key'])
354 354
                 ->toArray();
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
     protected function prepareField($name, $properties = [])
381 381
     {
382 382
         // Init
383
-        if (! $properties) {
383
+        if (!$properties) {
384 384
             $properties = $this->fields[$name];
385 385
         }
386 386
 
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
 
398 398
         // Define field type class namespace
399 399
         $className = '\Eliurkis\Crud\FieldTypes\\'.ucfirst($properties['type']);
400
-        if (! class_exists($className)) {
400
+        if (!class_exists($className)) {
401 401
             return;
402 402
         }
403 403
 
Please login to merge, or discard this patch.
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,10 +2,10 @@
 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;
6
+use DB;
8 7
 use Illuminate\Database\QueryException;
8
+use Illuminate\Http\Request;
9 9
 
10 10
 class CrudController extends Controller
11 11
 {
Please login to merge, or discard this patch.