Skip to content

Commit

Permalink
Parameter #4 $attributes (array<string, mixed>) of method LastDragon_…
Browse files Browse the repository at this point in the history
…ru\LaraASP\Eloquent\Casts\EnumCast::get() should be contravariant with parameter $attributes (array) of method Illuminate\Contracts\Database\Eloquent\CastsAttributes::get()

Parameter #4 $attributes (array<string, mixed>) of method LastDragon_ru\LaraASP\Eloquent\Casts\EnumCast::set() should becontravariant with parameter $attributes (array) of method Illuminate\Contracts\Database\Eloquent\CastsAttributes::set()
  • Loading branch information
LastDragon-ru committed Aug 14, 2021
1 parent 06618a4 commit 4377a71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/eloquent/src/Casts/EnumCast.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function __construct(
/**
* @inheritdoc
*
* @param array<string, mixed> $attributes
* @param array<mixed> $attributes
*/
public function get($model, string $key, $value, array $attributes): ?Enum {
if (is_null($value) || $value instanceof $this->enum) {
Expand All @@ -47,7 +47,7 @@ public function get($model, string $key, $value, array $attributes): ?Enum {
/**
* @inheritdoc
*
* @param array<string, mixed> $attributes
* @param array<mixed> $attributes
*/
public function set($model, string $key, $value, array $attributes): string|int|null {
if (!is_null($value)) {
Expand Down

0 comments on commit 4377a71

Please sign in to comment.