I've started using Flight microframework, but all methods are hidden under the hood (not declared in the Flight class).
How can I configure PHPStorm or should I write new set of rules?
Update: use framework instance doesn't work
I've tried to use framework instance, but has no success — I have internal methods in the suggestion list:
First of all: I'd suggest to submit new issue on their Issue Tracker asking to provide some sort of helper file (like below).. or implement it in any other way (e.g. via PHPDoc'
@method
forFlight
class -- no helper needed and no changes in the actual code -- just PHPDoc) so that IDE (e.g. PhpStorm or Netbeans) would not complain for non-existing methods and you will have some code completion help from IDE.Magic is good .. but not when whole interface is based on such magic.
On the actual question, which you can resolve yourself.
You will have to spend some time (half an hour or even less) and create some fake
Flight
class and put it anywhere in your IDE -- it will be used for code completion only. Yes, IDE may warn you about duplicate classes.. but that inspection can be turned off.The idea is to create a class and declare all required methods as they should have been done if it would be an ordinary class. To start with (will resolve issues for first code example on their readme):
Here is how it looks now:
As you can see
Flight
is underwaved -- IDE says that there is more than one class with such name in this project. Just tell PhpStorm to not to report such cases:For adding methods to the original class via
@method
PHPDoc tags: