@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | public function apply($model, Repository $repository) |
| 19 | 19 | { |
| 20 | - $query = $model->where(function ($query) use ($repository) { |
|
| 20 | + $query = $model->where(function($query) use ($repository) { |
|
| 21 | 21 | $firstColumn = array_shift($this->columns); |
| 22 | 22 | |
| 23 | 23 | if (strpos($firstColumn, '.')) { |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | private function getRelationClosure(array $relations) |
| 57 | 57 | { |
| 58 | - return function ($query) use ($relations) { |
|
| 58 | + return function($query) use ($relations) { |
|
| 59 | 59 | $relation = array_shift($relations); |
| 60 | 60 | |
| 61 | 61 | if (count($relations) > 0) { |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | //Sort alphabetically de menu items |
| 74 | - usort($menuItems, function ($itemA, $itemB) { |
|
| 74 | + usort($menuItems, function($itemA, $itemB) { |
|
| 75 | 75 | return strcmp($itemA['name'], $itemB['name']); |
| 76 | 76 | }); |
| 77 | 77 | |
@@ -441,7 +441,7 @@ discard block |
||
| 441 | 441 | $fieldName = $field->getName(); |
| 442 | 442 | $requestValue = $request->input("main.{$fieldName}"); |
| 443 | 443 | |
| 444 | - if (! empty($foreignFields) && (! empty($foreignFields[$fieldName])) && (empty($requestValue))) { |
|
| 444 | + if (!empty($foreignFields) && (!empty($foreignFields[$fieldName])) && (empty($requestValue))) { |
|
| 445 | 445 | $requestValue = null; |
| 446 | 446 | } |
| 447 | 447 | |
@@ -471,9 +471,9 @@ discard block |
||
| 471 | 471 | continue; |
| 472 | 472 | } |
| 473 | 473 | |
| 474 | - if (! empty($requestValue) |
|
| 474 | + if (!empty($requestValue) |
|
| 475 | 475 | || (empty($requestValue) && !empty($item->getAttribute($fieldName))) |
| 476 | - || (! empty($foreignFields) && (! empty($foreignFields[$fieldName])) && (empty($requestValue))) |
|
| 476 | + || (!empty($foreignFields) && (!empty($foreignFields[$fieldName])) && (empty($requestValue))) |
|
| 477 | 477 | ) { |
| 478 | 478 | $item->setAttribute( |
| 479 | 479 | $fieldName, |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | 'prefix' => 'crud', |
| 6 | 6 | 'namespace' => 'Anavel\Crud\Http\Controllers', |
| 7 | 7 | ], |
| 8 | - function () { |
|
| 8 | + function() { |
|
| 9 | 9 | Route::get('/', [ |
| 10 | 10 | 'as' => 'anavel-crud.home', |
| 11 | 11 | 'uses' => 'HomeController@index', |
@@ -48,14 +48,14 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | $this->app->bind( |
| 50 | 50 | 'Anavel\Crud\Contracts\Abstractor\FieldFactory', |
| 51 | - function () { |
|
| 51 | + function() { |
|
| 52 | 52 | return new FieldAbstractorFactory(new FormFactory()); |
| 53 | 53 | } |
| 54 | 54 | ); |
| 55 | 55 | |
| 56 | 56 | $this->app->bind( |
| 57 | 57 | 'Anavel\Crud\Contracts\Abstractor\RelationFactory', |
| 58 | - function () { |
|
| 58 | + function() { |
|
| 59 | 59 | return new RelationAbstractorFactory( |
| 60 | 60 | $this->app['ANavallaSuiza\Laravel\Database\Contracts\Manager\ModelManager'], |
| 61 | 61 | $this->app['Anavel\Crud\Contracts\Abstractor\FieldFactory'] |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | $this->app->bind( |
| 67 | 67 | 'Anavel\Crud\Contracts\Abstractor\ModelFactory', |
| 68 | - function () { |
|
| 68 | + function() { |
|
| 69 | 69 | return new ModelAbstractorFactory( |
| 70 | 70 | config('anavel-crud.models'), |
| 71 | 71 | $this->app['ANavallaSuiza\Laravel\Database\Contracts\Manager\ModelManager'], |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | |
| 80 | 80 | $this->app->bind( |
| 81 | 81 | 'Anavel\Crud\Contracts\Form\Generator', |
| 82 | - function () { |
|
| 82 | + function() { |
|
| 83 | 83 | return new FormGenerator(new FormFactory()); |
| 84 | 84 | } |
| 85 | 85 | ); |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | // If results are displayed using a field other than id, order by that field |
| 49 | - if (! empty($this->config['display'])) { |
|
| 49 | + if (!empty($this->config['display'])) { |
|
| 50 | 50 | asort($options); |
| 51 | 51 | } |
| 52 | 52 | |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | public function setup() |
| 20 | 20 | { |
| 21 | 21 | if (empty($this->langs)) { |
| 22 | - $this->langs = (array)config('anavel.translation_languages'); |
|
| 22 | + $this->langs = (array) config('anavel.translation_languages'); |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | $this->checkRelationCompatibility(); |