moodle-cs icon indicating copy to clipboard operation
moodle-cs copied to clipboard

@var Sniff should detect presence of $varname

Open andrewnicols opened this issue 10 months ago • 0 comments

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.

andrewnicols avatar Apr 05 '24 01:04 andrewnicols