-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Bug description
Report
Models which have an explicit public static function create defined seem to be ignored.
We're using MagicLink for a project which overwrites the public static function create function. But after running Generate helper code everywhere where we use this function we get the following:
Expected behaviour
I'd expect the autocomplete for this model (at least when calling SomeClass::create(...) directly, to be the arguments I've defined above.
Actual behaviour
This is the autocomplete from PHPStorm:

Which is caused by the generated helper code:

Plugin version
11.5.0.253
Operating system
Windows 11
Steps to reproduce
-
Place the model below in a laravel project:
namespace App\Models; use Illuminate\Database\Eloquent\Model; class SomeClass extends Model { protected $fillable = [ 'max', 'min', ]; public static function create(int $max, int $min): self { return new self(['max' => $max, 'min' => $min]); } }
-
Run: "Generate helper code"
-
Write
SomeClass::create()and look at the autocomplete.