I'm confused about PhpStorm's generation of Getters and Setters.
For example, if I have a class variable called $_token, and tell PhpStorm to generate a getter, it produces the following code:
public function getToken()
What confuses me is that, simply, this is not
a PHP getter. It's just a PHP function which happens to be called getToken(), and returns the value of $_token. It cannot be called as $obj->token, like a proper "getter" would.
"getter" for $_token would look like this:
public function __get($name)
throw new InvalidArgumentException('Invalid property: $name.');
Which would of course allow for $obj->token.
Why would PhpStorm generate the former, and not the latter?