It seems like the GitHub access token used for retrieving details about this repository from
GitHub became invalid. This might prevent certain types of inspections from being run (in
particular,
everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
The expression return new Spatie\Enum\L...tic::class, $arguments) returns the type Spatie\Enum\Laravel\Casts\EnumCollectionCast which is incompatible with the return type mandated by Illuminate\Contracts\Dat...t\Castable::castUsing() of string.
In the issue above, the returned value is violating the contract defined by the
mentioned interface.
Let's take a look at an example:
interfaceHasName{/** @return string */publicfunctiongetName();}className{public$name;}classUserimplementsHasName{/** @return string|Name */publicfunctiongetName(){returnnewName('foo');// This is a violation of the ``HasName`` interface// which only allows a string value to be returned.}}
Loading history...
18
}
19
20
return new EnumCast(static::class, ...$arguments);
The expression return new Spatie\Enum\L...tic::class, $arguments) returns the type Spatie\Enum\Laravel\Casts\EnumCast which is incompatible with the return type mandated by Illuminate\Contracts\Dat...t\Castable::castUsing() of string.
In the issue above, the returned value is violating the contract defined by the
mentioned interface.
Let's take a look at an example:
interfaceHasName{/** @return string */publicfunctiongetName();}className{public$name;}classUserimplementsHasName{/** @return string|Name */publicfunctiongetName(){returnnewName('foo');// This is a violation of the ``HasName`` interface// which only allows a string value to be returned.}}
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: