Skip to content

Mark class as problematic whenever a method argument miss types #234

@d8vjork

Description

@d8vjork

Actual behaviour

Here I've a visual example:

image

In this example I'm implementing Illuminate\Contracts\Database\Eloquent\CastsAttributes interface which enforces me to use proper models instead of my own Statusable interfaced models, so this is the error you could find at PHP runtime (in this case, at tests):

OpenSoutheners\LaravelModelStatus\Casts\Status::get(

OpenSoutheners\LaravelModelStatus\Statusable $model, string $key, OpenSoutheners\LaravelModelStatus\ModelStatus $value, array $attributes

):

string must be compatible with Illuminate\Contracts\Database\Eloquent\CastsAttributes::get(

$model, string $key, $value, array $attributes

) in /Users/d8vjork/Projects/open-southeners/laravel-model-status/src/Casts/Status.php on line 16

Expected behaviour

To warn about the error as it should normally do (at the class X implements Y)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions