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

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: phpdoc
    • Labels:

      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

            • Assignee:
              nebgor Aparup Banerjee
              Reporter:
              nebgor Aparup Banerjee
              Peer reviewer:
              Ankit Agarwal
              Integrator:
              Sam Hemelryk
              Tester:
              Sam Hemelryk
              Participants:
              Component watchers:
              Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                25/Jun/12