moodlehq / moodle-cs

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

@var Sniff should detect presence of $varname #151

Open andrewnicols opened 5 months ago

andrewnicols commented 5 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.