MDL-77599 coding-style: Replace forbidden @const tags by @var
@const is not a valid phpdoc tag and @var should be used to document both classes properties and constants (no matter how weird that may sound, heh). Link to (draft right now) PHP-FIG: https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc-tags.md#518-var So, with this commit we are just replacing all uses by the correct @var one. Note that the type is entirely optional, in fact I think that there isn't much need of it for constants because it's obvious for both humans and machines which the type is. But, as far as it's also correct to specify it, we haven't modified that detail. The only detail modified are the cases where the constant name was specified in the phpdoc, that's not needed, hence, the names have been removed from there when present (a couple of cases).
This commit is contained in:
+2
-2
@@ -2195,9 +2195,9 @@ class admin_setting_flag {
|
||||
private $shortname = '';
|
||||
/** @var string String used as the label for this flag */
|
||||
private $displayname = '';
|
||||
/** @const Checkbox for this flag is displayed in admin page */
|
||||
/** @var Checkbox for this flag is displayed in admin page */
|
||||
const ENABLED = true;
|
||||
/** @const Checkbox for this flag is not displayed in admin page */
|
||||
/** @var Checkbox for this flag is not displayed in admin page */
|
||||
const DISABLED = false;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user