@@ -29,6 +29,9 @@ |
||
29 | 29 | $this->formGenerator = $formGenerator; |
30 | 30 | } |
31 | 31 | |
32 | + /** |
|
33 | + * @param string $methodName |
|
34 | + */ |
|
32 | 35 | private function authorizeMethod(Model $modelAbstractor, $methodName) |
33 | 36 | { |
34 | 37 | $config = $modelAbstractor->getConfig(); |
@@ -145,7 +145,7 @@ |
||
145 | 145 | |
146 | 146 | $this->getIndexRequirements($request, $modelAbstractor, $repository); |
147 | 147 | |
148 | - $csv = (string)(new Csv)->fromArray($repository->all()->toArray()); |
|
148 | + $csv = (string) (new Csv)->fromArray($repository->all()->toArray()); |
|
149 | 149 | |
150 | 150 | return response()->make($csv, 200, [ |
151 | 151 | 'Content-Encoding' => 'UTF-8', |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | public function apply($model, Repository $repository) |
20 | 20 | { |
21 | - return $model->where(function ($query) { |
|
21 | + return $model->where(function($query) { |
|
22 | 22 | $firstColumn = array_shift($this->columns); |
23 | 23 | |
24 | 24 | if (strpos($firstColumn, '.')) { |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | |
54 | 54 | private function getRelationClosure(array $relations) |
55 | 55 | { |
56 | - return function ($query) use ($relations) { |
|
56 | + return function($query) use ($relations) { |
|
57 | 57 | $relation = array_shift($relations); |
58 | 58 | |
59 | 59 | if (count($relations) > 0) { |
@@ -25,7 +25,7 @@ |
||
25 | 25 | return $model; |
26 | 26 | } |
27 | 27 | |
28 | - return $model->with([array_shift($this->relation) => function ($q) { |
|
28 | + return $model->with([array_shift($this->relation) => function($q) { |
|
29 | 29 | $this->setWith($q); |
30 | 30 | }]); |
31 | 31 | } |
@@ -59,18 +59,18 @@ discard block |
||
59 | 59 | |
60 | 60 | $this->app->register('ANavallaSuiza\Laravel\Database\Manager\ModelManagerServiceProvider'); |
61 | 61 | |
62 | - $this->app->bind('Anavel\Crud\Contracts\Abstractor\FieldFactory', function () { |
|
62 | + $this->app->bind('Anavel\Crud\Contracts\Abstractor\FieldFactory', function() { |
|
63 | 63 | return new FieldAbstractorFactory(new FormFactory()); |
64 | 64 | }); |
65 | 65 | |
66 | - $this->app->bind('Anavel\Crud\Contracts\Abstractor\RelationFactory', function () { |
|
66 | + $this->app->bind('Anavel\Crud\Contracts\Abstractor\RelationFactory', function() { |
|
67 | 67 | return new RelationAbstractorFactory( |
68 | 68 | $this->app['ANavallaSuiza\Laravel\Database\Contracts\Manager\ModelManager'], |
69 | 69 | $this->app['Anavel\Crud\Contracts\Abstractor\FieldFactory'] |
70 | 70 | ); |
71 | 71 | }); |
72 | 72 | |
73 | - $this->app->bind('Anavel\Crud\Contracts\Abstractor\ModelFactory', function () { |
|
73 | + $this->app->bind('Anavel\Crud\Contracts\Abstractor\ModelFactory', function() { |
|
74 | 74 | return new ModelAbstractorFactory( |
75 | 75 | config('anavel-crud.models'), |
76 | 76 | $this->app['ANavallaSuiza\Laravel\Database\Contracts\Manager\ModelManager'], |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | ); |
82 | 82 | }); |
83 | 83 | |
84 | - $this->app->bind('Anavel\Crud\Contracts\Form\Generator', function () { |
|
84 | + $this->app->bind('Anavel\Crud\Contracts\Form\Generator', function() { |
|
85 | 85 | return new FormGenerator(new FormFactory()); |
86 | 86 | }); |
87 | 87 |