N
N
Never Ever2021-05-23 18:08:25
phpstorm
Never Ever, 2021-05-23 18:08:25

How to make PHPSTORM see Faker library methods?

Installed the latest version of lara and modules for it as ide helper, etc.
I started to deal with all this, got to the factories and noticed that the IDE does not see the method, for example: So, when you select after unique (), it sees only the safeEmail property, but not the method. I looked at the code, what is there in the library itself, it is written like this: What or where to connect in PHPSTORM to make it work?

60aa6e90ac81c544278130.png
'email' => $this->faker->unique()->safeEmail(),

60aa6f92f17fd002214224.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Gordinskiy, 2021-05-23
@Target1

Well, there are at least two options:
1) Go to github and register all the magic methods in PHPDoc as it is done with properties.
2) Use the variant already described in PHPDoc:
$this->faker->unique()->safeEmail

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question