From fe1049bc2183245db7c3910fb51fc11728449bc0 Mon Sep 17 00:00:00 2001 From: 514sid <140138716+514sid@users.noreply.github.com> Date: Sun, 3 Sep 2023 11:10:30 +0400 Subject: [PATCH] add laravel 8 support --- src/Casts/NumFloat.php | 5 ++--- src/Casts/NumInt.php | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Casts/NumFloat.php b/src/Casts/NumFloat.php index efc03e2..bec5a8a 100644 --- a/src/Casts/NumFloat.php +++ b/src/Casts/NumFloat.php @@ -3,7 +3,6 @@ namespace Num\Casts; use Num\Num; -use Illuminate\Database\Eloquent\Model; use Illuminate\Contracts\Database\Eloquent\CastsAttributes; class NumFloat implements CastsAttributes @@ -14,7 +13,7 @@ class NumFloat implements CastsAttributes * @param array $attributes * @return array */ - public function get(Model $model, string $key, mixed $value, array $attributes): ?float + public function get($model, string $key, mixed $value, array $attributes): ?float { if ($value === null) { return null; @@ -28,7 +27,7 @@ public function get(Model $model, string $key, mixed $value, array $attributes): * * @param array $attributes */ - public function set(Model $model, string $key, mixed $value, array $attributes): array + public function set($model, string $key, mixed $value, array $attributes): array { if ($value === null) { return [$key => $value]; diff --git a/src/Casts/NumInt.php b/src/Casts/NumInt.php index 4f78119..c8c0401 100644 --- a/src/Casts/NumInt.php +++ b/src/Casts/NumInt.php @@ -3,7 +3,6 @@ namespace Num\Casts; use Num\Num; -use Illuminate\Database\Eloquent\Model; use Illuminate\Contracts\Database\Eloquent\CastsAttributes; class NumInt implements CastsAttributes @@ -14,7 +13,7 @@ class NumInt implements CastsAttributes * @param array $attributes * @return array */ - public function get(Model $model, string $key, mixed $value, array $attributes): ?int + public function get($model, string $key, mixed $value, array $attributes): ?int { if ($value === null) { return null; @@ -28,7 +27,7 @@ public function get(Model $model, string $key, mixed $value, array $attributes): * * @param array $attributes */ - public function set(Model $model, string $key, mixed $value, array $attributes): array + public function set($model, string $key, mixed $value, array $attributes): array { if ($value === null) { return [$key => $value];