@@ -47,14 +47,14 @@ discard block |
||
47 | 47 | |
48 | 48 | $this->app->bind( |
49 | 49 | 'Anavel\Crud\Contracts\Abstractor\FieldFactory', |
50 | - function () { |
|
50 | + function() { |
|
51 | 51 | return new FieldAbstractorFactory(new FormFactory); |
52 | 52 | } |
53 | 53 | ); |
54 | 54 | |
55 | 55 | $this->app->bind( |
56 | 56 | 'Anavel\Crud\Contracts\Abstractor\RelationFactory', |
57 | - function () { |
|
57 | + function() { |
|
58 | 58 | return new RelationAbstractorFactory( |
59 | 59 | $this->app['ANavallaSuiza\Laravel\Database\Contracts\Manager\ModelManager'], |
60 | 60 | $this->app['Anavel\Crud\Contracts\Abstractor\FieldFactory'] |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | |
65 | 65 | $this->app->bind( |
66 | 66 | 'Anavel\Crud\Contracts\Abstractor\ModelFactory', |
67 | - function () { |
|
67 | + function() { |
|
68 | 68 | return new ModelAbstractorFactory( |
69 | 69 | config('anavel-crud.models'), |
70 | 70 | $this->app['ANavallaSuiza\Laravel\Database\Contracts\Manager\ModelManager'], |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | $this->app->bind( |
79 | 79 | 'Anavel\Crud\Contracts\Form\Generator', |
80 | - function () { |
|
80 | + function() { |
|
81 | 81 | return new FormGenerator(new FormFactory); |
82 | 82 | } |
83 | 83 | ); |
@@ -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' |
@@ -85,6 +85,9 @@ discard block |
||
85 | 85 | return transcrud($this->name); |
86 | 86 | } |
87 | 87 | |
88 | + /** |
|
89 | + * @return string |
|
90 | + */ |
|
88 | 91 | public function getModel() |
89 | 92 | { |
90 | 93 | return $this->model; |
@@ -334,7 +337,7 @@ discard block |
||
334 | 337 | } |
335 | 338 | |
336 | 339 | /** |
337 | - * @param array $requestForm |
|
340 | + * @param array $request |
|
338 | 341 | * @return mixed |
339 | 342 | */ |
340 | 343 | public function persist(Request $request) |
@@ -27,7 +27,7 @@ |
||
27 | 27 | /** |
28 | 28 | * @param array $config |
29 | 29 | * @param string $columnName |
30 | - * @return array |
|
30 | + * @return \Doctrine\DBAL\Schema\Column |
|
31 | 31 | */ |
32 | 32 | public function setConfig(array $config, $columnName) |
33 | 33 | { |
@@ -55,7 +55,6 @@ |
||
55 | 55 | public function getSecondaryRelations(); |
56 | 56 | |
57 | 57 | /** |
58 | - * @param Model $relatedModel |
|
59 | 58 | * @return Relation |
60 | 59 | */ |
61 | 60 | public function setRelatedModel(\Illuminate\Database\Eloquent\Model $model); |
@@ -9,6 +9,9 @@ |
||
9 | 9 | |
10 | 10 | trait HandleFiles |
11 | 11 | { |
12 | + /** |
|
13 | + * @param string $groupName |
|
14 | + */ |
|
12 | 15 | protected function handleField(Request $request, $item, array $fields, $currentKey, $groupName, $fieldName) |
13 | 16 | { |
14 | 17 | $modelFolder = $this->slug . DIRECTORY_SEPARATOR; |
@@ -25,6 +25,9 @@ |
||
25 | 25 | $this->formGenerator = $formGenerator; |
26 | 26 | } |
27 | 27 | |
28 | + /** |
|
29 | + * @param string $methodName |
|
30 | + */ |
|
28 | 31 | private function authorizeMethod(Model $modelAbstractor, $methodName) |
29 | 32 | { |
30 | 33 | if (array_key_exists('authorize', $config = $modelAbstractor->getConfig()) && $config['authorize'] === true) { |
@@ -39,7 +39,7 @@ |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
42 | - * @param $slug |
|
42 | + * @param string $slug |
|
43 | 43 | * @param null $id |
44 | 44 | * @return Model|null |
45 | 45 | * @throws \Exception |
@@ -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) { |