Skip to content

Commit

Permalink
add laravel 8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
514sid committed Sep 3, 2023
1 parent 7e6484f commit fe1049b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/Casts/NumFloat.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -14,7 +13,7 @@ class NumFloat implements CastsAttributes
* @param array<string, mixed> $attributes
* @return array<string, mixed>
*/
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;
Expand All @@ -28,7 +27,7 @@ public function get(Model $model, string $key, mixed $value, array $attributes):
*
* @param array<string, mixed> $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];
Expand Down
5 changes: 2 additions & 3 deletions src/Casts/NumInt.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -14,7 +13,7 @@ class NumInt implements CastsAttributes
* @param array<string, mixed> $attributes
* @return array<string, mixed>
*/
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;
Expand All @@ -28,7 +27,7 @@ public function get(Model $model, string $key, mixed $value, array $attributes):
*
* @param array<string, mixed> $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];
Expand Down

0 comments on commit fe1049b

Please sign in to comment.