moodlehq / moodle-cs

Moodle Coding Style
https://github.com/moodlehq/moodle-cs
GNU General Public License v3.0
18 stars 16 forks source link

@var Sniff should detect presence of $varname #151

Open andrewnicols opened 7 months ago

andrewnicols commented 7 months ago

Incorrect:

/** @var string $example An example string */
protected $example;

Correct:

/** @var string An example string */
protected $example;

The name of the var is inferred from the var itself. No need to specify it.