L
L
Lycosidae2018-12-19 17:46:29
phpstorm
Lycosidae, 2018-12-19 17:46:29

How to configure phpstorm to show variables from index file?

Good day !
The problem is:
I have a self-written MVC framework with the following folder structure:
5c1a5887bf0f9027897287.png
Question 1: How can I make phpstorm inside application see the variables declared in index.php ?
Question 2: How can I make phpstorm start searching inside any child folder not from the directory in which the file is located, but directly from the directory in which index.php is located, that is, the root of the project?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey delphinpro, 2018-12-19
@Lycosidae

For question 1:
Use phpdoc comments.
In any file write

/**
 *  @var int $myVar
 *  @var CustomType $myVar2
 */

Yes, this is extra work. No, there's nowhere to go.
Right click on the web root folder and mark it as "Resource Root". You can mark several such directories.
5c1a765a29d2a668436041.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question