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:
Eloy Lafuente (stronk7)
2023-07-03 15:58:16 +02:00
parent 8dbb6183ff
commit d9f7fe9c3f
15 changed files with 39 additions and 39 deletions
+2 -2
View File
@@ -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;
/**