@@ -23,12 +23,12 @@ discard block |
||
| 23 | 23 | public static function registerRoutes(Router $router) |
| 24 | 24 | { |
| 25 | 25 | $routeName = 'admin.display.tree.reorder'; |
| 26 | - if (! $router->has($routeName)) { |
|
| 27 | - $router->post('{adminModel}/reorder', ['as' => $routeName, function (ModelConfigurationInterface $model) { |
|
| 26 | + if (!$router->has($routeName)) { |
|
| 27 | + $router->post('{adminModel}/reorder', [ 'as' => $routeName, function(ModelConfigurationInterface $model) { |
|
| 28 | 28 | $model->fireDisplay()->getRepository()->reorder( |
| 29 | 29 | Request::input('data') |
| 30 | 30 | ); |
| 31 | - }]); |
|
| 31 | + } ]); |
|
| 32 | 32 | } |
| 33 | 33 | } |
| 34 | 34 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | /** |
| 41 | 41 | * @var array |
| 42 | 42 | */ |
| 43 | - protected $parameters = []; |
|
| 43 | + protected $parameters = [ ]; |
|
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * @var bool |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | */ |
| 209 | 209 | public function setParameter($key, $value) |
| 210 | 210 | { |
| 211 | - $this->parameters[$key] = $value; |
|
| 211 | + $this->parameters[ $key ] = $value; |
|
| 212 | 212 | |
| 213 | 213 | return $this; |
| 214 | 214 | } |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | 'value' => $this->getValue(), |
| 256 | 256 | 'creatable' => $model->isCreatable(), |
| 257 | 257 | 'createUrl' => $model->getCreateUrl($this->getParameters() + Request::all()), |
| 258 | - 'controls' => [app('sleeping_owl.table.column')->treeControl()], |
|
| 258 | + 'controls' => [ app('sleeping_owl.table.column')->treeControl() ], |
|
| 259 | 259 | ]; |
| 260 | 260 | } |
| 261 | 261 | |
@@ -273,11 +273,11 @@ discard block |
||
| 273 | 273 | */ |
| 274 | 274 | public function getCollection() |
| 275 | 275 | { |
| 276 | - if (! $this->isInitialized()) { |
|
| 276 | + if (!$this->isInitialized()) { |
|
| 277 | 277 | throw new \Exception('Display is not initialized'); |
| 278 | 278 | } |
| 279 | 279 | |
| 280 | - if (! is_null($this->collection)) { |
|
| 280 | + if (!is_null($this->collection)) { |
|
| 281 | 281 | return $this->collection; |
| 282 | 282 | } |
| 283 | 283 | |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | */ |
| 294 | 294 | protected function modifyQuery(\Illuminate\Database\Eloquent\Builder $query) |
| 295 | 295 | { |
| 296 | - $this->extensions->each(function (DisplayExtensionInterface $extension) use ($query) { |
|
| 296 | + $this->extensions->each(function(DisplayExtensionInterface $extension) use ($query) { |
|
| 297 | 297 | $extension->modifyQuery($query); |
| 298 | 298 | }); |
| 299 | 299 | } |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | { |
| 307 | 307 | $repository = parent::makeRepository(); |
| 308 | 308 | |
| 309 | - if (! ($repository instanceof TreeRepositoryInterface)) { |
|
| 309 | + if (!($repository instanceof TreeRepositoryInterface)) { |
|
| 310 | 310 | throw new \Exception('Repository class must be instanced of [TreeRepositoryInterface]'); |
| 311 | 311 | } |
| 312 | 312 | |
@@ -38,8 +38,8 @@ |
||
| 38 | 38 | $relationName = implode('.', $parts); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - if (! is_null($relationName)) { |
|
| 42 | - $query->whereHas($relationName, function ($q) use ($name, $value) { |
|
| 41 | + if (!is_null($relationName)) { |
|
| 42 | + $query->whereHas($relationName, function($q) use ($name, $value) { |
|
| 43 | 43 | $this->buildQuery($q, $name, $value); |
| 44 | 44 | }); |
| 45 | 45 | } else { |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | $this->setName($name); |
| 38 | 38 | $this->setAlias($name); |
| 39 | 39 | |
| 40 | - if (! is_null($title)) { |
|
| 40 | + if (!is_null($title)) { |
|
| 41 | 41 | $this->setTitle($title); |
| 42 | 42 | } |
| 43 | 43 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | return call_user_func($this->title, $this->getValue()); |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | - return strtr($this->title, [':value' => $this->getValue()]); |
|
| 106 | + return strtr($this->title, [ ':value' => $this->getValue() ]); |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | /** |
@@ -143,6 +143,6 @@ discard block |
||
| 143 | 143 | */ |
| 144 | 144 | public function isActive() |
| 145 | 145 | { |
| 146 | - return ! is_null($this->getValue()); |
|
| 146 | + return !is_null($this->getValue()); |
|
| 147 | 147 | } |
| 148 | 148 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | public function __construct(Closure $callback = null) |
| 26 | 26 | { |
| 27 | - if (! is_null($callback)) { |
|
| 27 | + if (!is_null($callback)) { |
|
| 28 | 28 | $this->setCallback($callback); |
| 29 | 29 | } |
| 30 | 30 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | { |
| 44 | 44 | $this->initializeElements(); |
| 45 | 45 | |
| 46 | - $activeTabs = $this->getTabs()->filter(function (TabInterface $tab) { |
|
| 46 | + $activeTabs = $this->getTabs()->filter(function(TabInterface $tab) { |
|
| 47 | 47 | return $tab->isActive(); |
| 48 | 48 | })->count(); |
| 49 | 49 | |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | public function setModelClass($class) |
| 59 | 59 | { |
| 60 | - $this->getTabs()->each(function (TabInterface $tab) use ($class) { |
|
| 60 | + $this->getTabs()->each(function(TabInterface $tab) use ($class) { |
|
| 61 | 61 | if ($tab instanceof DisplayInterface) { |
| 62 | 62 | $tab->setModelClass($class); |
| 63 | 63 | } |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | */ |
| 138 | 138 | public function setAction($action) |
| 139 | 139 | { |
| 140 | - $this->getTabs()->each(function (TabInterface $tab) use ($action) { |
|
| 140 | + $this->getTabs()->each(function(TabInterface $tab) use ($action) { |
|
| 141 | 141 | if ($tab instanceof FormInterface) { |
| 142 | 142 | $tab->setAction($action); |
| 143 | 143 | } |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | */ |
| 150 | 150 | public function setId($id) |
| 151 | 151 | { |
| 152 | - $this->getTabs()->each(function (TabInterface $tab) use ($id) { |
|
| 152 | + $this->getTabs()->each(function(TabInterface $tab) use ($id) { |
|
| 153 | 153 | if ($tab instanceof FormInterface) { |
| 154 | 154 | $tab->setId($id); |
| 155 | 155 | } |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | foreach ($this->getTabs() as $tab) { |
| 167 | 167 | if ($tab instanceof FormInterface) { |
| 168 | 168 | $result = $tab->validateForm($model); |
| 169 | - if (! is_null($result)) { |
|
| 169 | + if (!is_null($result)) { |
|
| 170 | 170 | return $result; |
| 171 | 171 | } |
| 172 | 172 | } |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | */ |
| 179 | 179 | public function saveForm(ModelConfigurationInterface $model) |
| 180 | 180 | { |
| 181 | - $this->getTabs()->each(function (TabInterface $tab) use ($model) { |
|
| 181 | + $this->getTabs()->each(function(TabInterface $tab) use ($model) { |
|
| 182 | 182 | if ($tab instanceof FormInterface) { |
| 183 | 183 | $tab->saveForm($model); |
| 184 | 184 | } |
@@ -32,11 +32,11 @@ discard block |
||
| 32 | 32 | */ |
| 33 | 33 | public function fireDisplay() |
| 34 | 34 | { |
| 35 | - if (! method_exists($this, 'onDisplay')) { |
|
| 35 | + if (!method_exists($this, 'onDisplay')) { |
|
| 36 | 36 | return; |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | - $display = app()->call([$this, 'onDisplay']); |
|
| 39 | + $display = app()->call([ $this, 'onDisplay' ]); |
|
| 40 | 40 | |
| 41 | 41 | if ($display instanceof DisplayInterface) { |
| 42 | 42 | $display->setModelClass($this->getClass()); |
@@ -51,11 +51,11 @@ discard block |
||
| 51 | 51 | */ |
| 52 | 52 | public function fireCreate() |
| 53 | 53 | { |
| 54 | - if (! method_exists($this, 'onCreate')) { |
|
| 54 | + if (!method_exists($this, 'onCreate')) { |
|
| 55 | 55 | return; |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | - $form = app()->call([$this, 'onCreate']); |
|
| 58 | + $form = app()->call([ $this, 'onCreate' ]); |
|
| 59 | 59 | if ($form instanceof DisplayInterface) { |
| 60 | 60 | $form->setModelClass($this->getClass()); |
| 61 | 61 | } |
@@ -78,11 +78,11 @@ discard block |
||
| 78 | 78 | */ |
| 79 | 79 | public function fireEdit($id) |
| 80 | 80 | { |
| 81 | - if (! method_exists($this, 'onEdit')) { |
|
| 81 | + if (!method_exists($this, 'onEdit')) { |
|
| 82 | 82 | return; |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | - $form = app()->call([$this, 'onEdit'], ['id' => $id]); |
|
| 85 | + $form = app()->call([ $this, 'onEdit' ], [ 'id' => $id ]); |
|
| 86 | 86 | if ($form instanceof DisplayInterface) { |
| 87 | 87 | $form->setModelClass($this->getClass()); |
| 88 | 88 | } |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | public function fireDelete($id) |
| 108 | 108 | { |
| 109 | 109 | if (method_exists($this, 'onDelete')) { |
| 110 | - return app()->call([$this, 'onDelete'], ['id' => $id]); |
|
| 110 | + return app()->call([ $this, 'onDelete' ], [ 'id' => $id ]); |
|
| 111 | 111 | } |
| 112 | 112 | } |
| 113 | 113 | |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | public function fireDestroy($id) |
| 120 | 120 | { |
| 121 | 121 | if (method_exists($this, 'onDestroy')) { |
| 122 | - return app()->call([$this, 'onDestroy'], ['id' => $id]); |
|
| 122 | + return app()->call([ $this, 'onDestroy' ], [ 'id' => $id ]); |
|
| 123 | 123 | } |
| 124 | 124 | } |
| 125 | 125 | |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | public function fireRestore($id) |
| 132 | 132 | { |
| 133 | 133 | if (method_exists($this, 'onRestore')) { |
| 134 | - return app()->call([$this, 'onRestore'], ['id' => $id]); |
|
| 134 | + return app()->call([ $this, 'onRestore' ], [ 'id' => $id ]); |
|
| 135 | 135 | } |
| 136 | 136 | } |
| 137 | 137 | } |
@@ -333,7 +333,7 @@ discard block |
||
| 333 | 333 | */ |
| 334 | 334 | public function isCreatable() |
| 335 | 335 | { |
| 336 | - if (! is_callable($this->getCreate())) { |
|
| 336 | + if (!is_callable($this->getCreate())) { |
|
| 337 | 337 | return false; |
| 338 | 338 | } |
| 339 | 339 | |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | */ |
| 358 | 358 | public function isEditable(Model $model) |
| 359 | 359 | { |
| 360 | - if (! is_callable($this->getEdit())) { |
|
| 360 | + if (!is_callable($this->getEdit())) { |
|
| 361 | 361 | return false; |
| 362 | 362 | } |
| 363 | 363 | |
@@ -467,7 +467,7 @@ discard block |
||
| 467 | 467 | */ |
| 468 | 468 | public function fireDisplay() |
| 469 | 469 | { |
| 470 | - if (! is_callable($this->display)) { |
|
| 470 | + if (!is_callable($this->display)) { |
|
| 471 | 471 | return; |
| 472 | 472 | } |
| 473 | 473 | |
@@ -485,7 +485,7 @@ discard block |
||
| 485 | 485 | */ |
| 486 | 486 | public function fireCreate() |
| 487 | 487 | { |
| 488 | - if (! is_callable($this->create)) { |
|
| 488 | + if (!is_callable($this->create)) { |
|
| 489 | 489 | return; |
| 490 | 490 | } |
| 491 | 491 | |
@@ -512,11 +512,11 @@ discard block |
||
| 512 | 512 | */ |
| 513 | 513 | public function fireEdit($id) |
| 514 | 514 | { |
| 515 | - if (! is_callable($this->edit)) { |
|
| 515 | + if (!is_callable($this->edit)) { |
|
| 516 | 516 | return; |
| 517 | 517 | } |
| 518 | 518 | |
| 519 | - $form = app()->call($this->edit, ['id' => $id]); |
|
| 519 | + $form = app()->call($this->edit, [ 'id' => $id ]); |
|
| 520 | 520 | if ($form instanceof DisplayInterface) { |
| 521 | 521 | $form->setModelClass($this->getClass()); |
| 522 | 522 | } |
@@ -541,7 +541,7 @@ discard block |
||
| 541 | 541 | public function fireDelete($id) |
| 542 | 542 | { |
| 543 | 543 | if (is_callable($this->getDelete())) { |
| 544 | - return app()->call($this->getDelete(), [$id]); |
|
| 544 | + return app()->call($this->getDelete(), [ $id ]); |
|
| 545 | 545 | } |
| 546 | 546 | } |
| 547 | 547 | |
@@ -553,7 +553,7 @@ discard block |
||
| 553 | 553 | public function fireDestroy($id) |
| 554 | 554 | { |
| 555 | 555 | if (is_callable($this->getDestroy())) { |
| 556 | - return app()->call($this->getDestroy(), [$id]); |
|
| 556 | + return app()->call($this->getDestroy(), [ $id ]); |
|
| 557 | 557 | } |
| 558 | 558 | } |
| 559 | 559 | |
@@ -565,7 +565,7 @@ discard block |
||
| 565 | 565 | public function fireRestore($id) |
| 566 | 566 | { |
| 567 | 567 | if (is_callable($this->getRestore())) { |
| 568 | - return app()->call($this->getRestore(), [$id]); |
|
| 568 | + return app()->call($this->getRestore(), [ $id ]); |
|
| 569 | 569 | } |
| 570 | 570 | |
| 571 | 571 | return $this->getRestore(); |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | { |
| 10 | 10 | public function __construct() |
| 11 | 11 | { |
| 12 | - Meta::addJs('admin-default', resources_url('js/admin-app.js'), ['admin-scripts'], true) |
|
| 12 | + Meta::addJs('admin-default', resources_url('js/admin-app.js'), [ 'admin-scripts' ], true) |
|
| 13 | 13 | ->addJs('admin-scripts', route('admin.scripts')) |
| 14 | 14 | ->addCss('admin-default', resources_url('css/admin-app.css')); |
| 15 | 15 | } |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | * |
| 55 | 55 | * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View |
| 56 | 56 | */ |
| 57 | - public function view($view, $data = [], $mergeData = []) |
|
| 57 | + public function view($view, $data = [ ], $mergeData = [ ]) |
|
| 58 | 58 | { |
| 59 | 59 | if ($view instanceof \Illuminate\View\View) { |
| 60 | 60 | return $view->with($data); |
@@ -26,16 +26,16 @@ discard block |
||
| 26 | 26 | { |
| 27 | 27 | $routeName = 'admin.form.element.'.static::$route; |
| 28 | 28 | |
| 29 | - if (! $router->has($routeName)) { |
|
| 30 | - $router->post('{adminModel}/'.static::$route.'/{field}/{id?}', ['as' => $routeName, function ( |
|
| 29 | + if (!$router->has($routeName)) { |
|
| 30 | + $router->post('{adminModel}/'.static::$route.'/{field}/{id?}', [ 'as' => $routeName, function( |
|
| 31 | 31 | Request $request, |
| 32 | 32 | ModelConfigurationInterface $model, |
| 33 | 33 | $field, |
| 34 | 34 | $id = null |
| 35 | 35 | ) { |
| 36 | - if (! is_null($id)) { |
|
| 36 | + if (!is_null($id)) { |
|
| 37 | 37 | $item = $model->getRepository()->find($id); |
| 38 | - if (is_null($item) || ! $model->isEditable($item)) { |
|
| 38 | + if (is_null($item) || !$model->isEditable($item)) { |
|
| 39 | 39 | return new JsonResponse([ |
| 40 | 40 | 'message' => trans('lang.message.access_denied'), |
| 41 | 41 | ], 403); |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | $form = $model->fireEdit($id); |
| 45 | 45 | } else { |
| 46 | - if (! $model->isCreatable()) { |
|
| 46 | + if (!$model->isCreatable()) { |
|
| 47 | 47 | return new JsonResponse([ |
| 48 | 48 | 'message' => trans('lang.message.access_denied'), |
| 49 | 49 | ], 403); |
@@ -52,11 +52,11 @@ discard block |
||
| 52 | 52 | $form = $model->fireCreate(); |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - $messages = []; |
|
| 56 | - $labels = []; |
|
| 55 | + $messages = [ ]; |
|
| 56 | + $labels = [ ]; |
|
| 57 | 57 | $rules = static::defaultUploadValidationRules(); |
| 58 | 58 | |
| 59 | - if (! is_null($element = $form->getElement($field))) { |
|
| 59 | + if (!is_null($element = $form->getElement($field))) { |
|
| 60 | 60 | $rules = $element->getUploadValidationRules(); |
| 61 | 61 | $messages = $element->getUploadValidationMessages(); |
| 62 | 62 | $labels = $element->getUploadValidationLabels(); |
@@ -76,14 +76,14 @@ discard block |
||
| 76 | 76 | $file = $request->file('file'); |
| 77 | 77 | |
| 78 | 78 | /** @var File $element */ |
| 79 | - if (! is_null($element = $form->getElement($field))) { |
|
| 79 | + if (!is_null($element = $form->getElement($field))) { |
|
| 80 | 80 | $filename = $element->getUploadFileName($file); |
| 81 | 81 | $path = $element->getUploadPath($file); |
| 82 | 82 | $settings = $element->getUploadSettings(); |
| 83 | 83 | } else { |
| 84 | 84 | $filename = static::defaultUploadFilename($file); |
| 85 | 85 | $path = static::defaultUploadPath($file); |
| 86 | - $settings = []; |
|
| 86 | + $settings = [ ]; |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | static::saveFile($file, public_path($path), $filename, $settings); |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | 'url' => asset($value), |
| 95 | 95 | 'value' => $value, |
| 96 | 96 | ]); |
| 97 | - }]); |
|
| 97 | + } ]); |
|
| 98 | 98 | } |
| 99 | 99 | } |
| 100 | 100 | |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | protected static function defaultUploadValidationRules() |
| 143 | 143 | { |
| 144 | 144 | return [ |
| 145 | - 'file' => ['required', 'file'], |
|
| 145 | + 'file' => [ 'required', 'file' ], |
|
| 146 | 146 | ]; |
| 147 | 147 | } |
| 148 | 148 | |
@@ -159,21 +159,21 @@ discard block |
||
| 159 | 159 | /** |
| 160 | 160 | * @var array |
| 161 | 161 | */ |
| 162 | - protected $uploadSettings = []; |
|
| 162 | + protected $uploadSettings = [ ]; |
|
| 163 | 163 | |
| 164 | 164 | /** |
| 165 | 165 | * @var array |
| 166 | 166 | */ |
| 167 | - protected $uploadValidationRules = ['required', 'file']; |
|
| 167 | + protected $uploadValidationRules = [ 'required', 'file' ]; |
|
| 168 | 168 | |
| 169 | 169 | /** |
| 170 | 170 | * @return array |
| 171 | 171 | */ |
| 172 | 172 | public function getUploadValidationMessages() |
| 173 | 173 | { |
| 174 | - $messages = []; |
|
| 174 | + $messages = [ ]; |
|
| 175 | 175 | foreach ($this->validationMessages as $rule => $message) { |
| 176 | - $messages["file.{$rule}"] = $message; |
|
| 176 | + $messages[ "file.{$rule}" ] = $message; |
|
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | return $messages; |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | */ |
| 185 | 185 | public function getUploadValidationLabels() |
| 186 | 186 | { |
| 187 | - return ['file' => $this->getLabel()]; |
|
| 187 | + return [ 'file' => $this->getLabel() ]; |
|
| 188 | 188 | } |
| 189 | 189 | |
| 190 | 190 | /** |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | */ |
| 193 | 193 | public function getUploadValidationRules() |
| 194 | 194 | { |
| 195 | - return ['file' => array_unique($this->uploadValidationRules)]; |
|
| 195 | + return [ 'file' => array_unique($this->uploadValidationRules) ]; |
|
| 196 | 196 | } |
| 197 | 197 | |
| 198 | 198 | /** |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | */ |
| 203 | 203 | public function getUploadPath(UploadedFile $file) |
| 204 | 204 | { |
| 205 | - if (! is_callable($this->uploadFileName)) { |
|
| 205 | + if (!is_callable($this->uploadFileName)) { |
|
| 206 | 206 | return static::defaultUploadPath($file); |
| 207 | 207 | } |
| 208 | 208 | |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | */ |
| 229 | 229 | public function getUploadFileName(UploadedFile $file) |
| 230 | 230 | { |
| 231 | - if (! is_callable($this->uploadFileName)) { |
|
| 231 | + if (!is_callable($this->uploadFileName)) { |
|
| 232 | 232 | return static::defaultUploadFilename($file); |
| 233 | 233 | } |
| 234 | 234 | |
@@ -279,11 +279,11 @@ discard block |
||
| 279 | 279 | */ |
| 280 | 280 | public function addValidationRule($rule, $message = null) |
| 281 | 281 | { |
| 282 | - $uploadRules = ['file', 'image', 'mime', 'size', 'dimensions', 'max', 'min', 'between']; |
|
| 282 | + $uploadRules = [ 'file', 'image', 'mime', 'size', 'dimensions', 'max', 'min', 'between' ]; |
|
| 283 | 283 | |
| 284 | 284 | foreach ($uploadRules as $uploadRule) { |
| 285 | 285 | if (strpos($rule, $uploadRule) !== false) { |
| 286 | - $this->uploadValidationRules[] = $rule; |
|
| 286 | + $this->uploadValidationRules[ ] = $rule; |
|
| 287 | 287 | |
| 288 | 288 | if (is_null($message)) { |
| 289 | 289 | return $this; |