Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-31711

invalid usages of '@property' found for class variables that are not really 'magic' variables.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.3
    • 2.3
    • PHPDoc

      i was working on MDL-25027 when i came across usages of @property - lib/externallib.php class external_value's phpdoc has :

          /** @property mixed $type value type PARAM_XX */
          public $type;

      see - http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_tags.property.pkg.html

      looking it up i read this about @property - '....in the "Property Summary" listing of your class variables, but you will NOT see "$regular", "$foo", or "$bar" there...'
      clearly some usages of @property should actually be @var as we DO want them documented and shown in the class's property summary.

      @property is really only for magic variables where we want to HIDE them from normal users.

            nebgor Aparup Banerjee
            nebgor Aparup Banerjee
            Ankit Agarwal Ankit Agarwal
            Sam Hemelryk Sam Hemelryk
            Sam Hemelryk Sam Hemelryk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.