From 1fb7526a8a17cf43c539365ebef9246a562f2dcb Mon Sep 17 00:00:00 2001 From: Hashemi Rafsan Date: Mon, 14 Sep 2020 09:42:50 +0600 Subject: [PATCH] re-factoring and add doc block --- src/Fireworks.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/Fireworks.php b/src/Fireworks.php index a6fe348..afc8925 100644 --- a/src/Fireworks.php +++ b/src/Fireworks.php @@ -1,5 +1,6 @@ callColumnsEvent($model, ('onModel%s' . Str::studly($event))); } /** * @param Model $model - * @param $event + * @param string $event */ - private function callAfterEvent(Model $model, $event) : void + private function callAfterEvent(Model $model, string $event): void { $this->callColumnsEvent($model, ('onModel%s'.Str::studly($event))); } /** - * @param $model - * @param $methodConvention + * @param Model $model + * @param string $methodConvention */ - private function callColumnsEvent(Model $model, string $methodConvention) : void + private function callColumnsEvent(Model $model, string $methodConvention): void { foreach ($model->getDirty() ?? [] as $column => $newValue) { $method = sprintf($methodConvention, Str::studly($column));