How to organize auto-completion when using __get, __set?

IDE — phpStorm

a lot organizations won autocomplete using phpdoc, but with getter-setters are not impossible to manage.


Does anyone have the recipe?
October 8th 19 at 00:46
2 answers
October 8th 19 at 00:48
Solution
Yes. Through phpdoc. Something like this:
<?
/**
 * @property int $price
 * @property int $min_s
 * @property int $max_s
*
 * @property string $link
*
 * @property Item[] $item
 * @property Photo[] $photos
 * @property Scheme[] $schemes
*/
class Example extends EActiveRecord{
/*class body*/
}
</property-->
Great, so simple, thank you! - olen48 commented on October 8th 19 at 00:51
October 8th 19 at 00:50
In the same way you can add methods

<?php
/**
 * Some class
*
 * @method static returntype methodname() comment
 * @method returntype methodname() comment
*/
?>
By the way, Yes. It got me thinking as well can scopes for Yii to describe.
Plyusanut can't, but nevertheless, great thanks :-) - olen48 commented on October 8th 19 at 00:53

Find more questions by tags PhpStormAutomatic code completionWeb DevelopmentPHP