@@ -60,8 +60,7 @@ discard block |
||
60 | 60 | $this->fields->hydrateErrorsFromSession(); |
61 | 61 | $this->fields->hydrateFieldsFromSession(); |
62 | 62 | } |
63 | - } |
|
64 | - else |
|
63 | + } else |
|
65 | 64 | { |
66 | 65 | throw new InvalidModelException("The model must use Crudable trait."); |
67 | 66 | } |
@@ -147,8 +146,7 @@ discard block |
||
147 | 146 | 'csrf_field' => csrf_field(), |
148 | 147 | 'method_field' => method_field($method), |
149 | 148 | ]; |
150 | - } |
|
151 | - else |
|
149 | + } else |
|
152 | 150 | { |
153 | 151 | $view_name = 'crud::form-update'; |
154 | 152 | $method = $this->manager->getActionMethod('update'); |
@@ -62,8 +62,7 @@ |
||
62 | 62 | { |
63 | 63 | $this->addRule($rule); |
64 | 64 | } |
65 | - } |
|
66 | - else |
|
65 | + } else |
|
67 | 66 | { |
68 | 67 | if (is_string($rules)) |
69 | 68 | { |
@@ -62,8 +62,7 @@ |
||
62 | 62 | { |
63 | 63 | $this->addRule($rule); |
64 | 64 | } |
65 | - } |
|
66 | - else |
|
65 | + } else |
|
67 | 66 | { |
68 | 67 | if (is_string($rules)) |
69 | 68 | { |
@@ -47,8 +47,7 @@ |
||
47 | 47 | if (is_string($crudable)) |
48 | 48 | { |
49 | 49 | return new CrudEntry(new $crudable); |
50 | - } |
|
51 | - else if (is_object($crudable) && array_key_exists(Crudable::class, class_uses($crudable))) |
|
50 | + } else if (is_object($crudable) && array_key_exists(Crudable::class, class_uses($crudable))) |
|
52 | 51 | { |
53 | 52 | return new CrudEntry($crudable); |
54 | 53 | } |
@@ -62,8 +62,7 @@ |
||
62 | 62 | { |
63 | 63 | $this->addRule($rule); |
64 | 64 | } |
65 | - } |
|
66 | - else |
|
65 | + } else |
|
67 | 66 | { |
68 | 67 | if (is_string($rules)) |
69 | 68 | { |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | 'prefix' => $this->route_uri_prefix, |
254 | 254 | 'as' => $this->route_name_prefix, |
255 | 255 | 'middleware' => 'web' |
256 | - ], function (Router $router) use ($routes, $controller) |
|
256 | + ], function(Router $router) use ($routes, $controller) |
|
257 | 257 | { |
258 | 258 | foreach ($routes as $route) |
259 | 259 | { |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | */ |
296 | 296 | public function setPerPage($per_page = 25) |
297 | 297 | { |
298 | - $this->per_page = (int)$per_page; |
|
298 | + $this->per_page = (int) $per_page; |
|
299 | 299 | |
300 | 300 | return $this; |
301 | 301 | } |