Uploaded image for project: 'Moodle Community Sites'
  1. Moodle Community Sites
  2. MDLSITE-5963

POLICY: Stop requiring @copyright and @license for individual classes

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: Coding style
    • Labels:
      None

      Description

      The current coding style and associated PHPdoc check rules demand that each class has its own @copyright and @license tags.

      This made sense in the past where we typically had many classes in one library file and it was useful to keep track of who holds copyright and credit for each of the added class.

      But today, with autoloading being the common and recommended practise, we only have one class per file. So the information about the copyright and license is typically duplicated - once in the file's phpdoc block and then the same info in the class' block.

      I suggest to stop demanding these tags in the class php doc block. Let us require them in the file level only and let is make them optional in the class' block (can be still added but warning is not raised when they are not).

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                13 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: