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

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3
    • 2.3
    • PHPDoc

    Description

      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.

      Attachments

        Activity

          People

            nebgor Aparup Banerjee
            nebgor Aparup Banerjee
            Ankit Agarwal Ankit Agarwal
            Sam Hemelryk Sam Hemelryk
            Sam Hemelryk Sam Hemelryk
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              25/Jun/12