Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-8097

Enforce coding guidelines for trailing comma in multi-line array declaration

    XMLWordPrintable

Details

    • Bug
    • Resolution: Deferred
    • Minor
    • None
    • 3.9
    • Local: Code checker
    • None
    • MOODLE_39_STABLE

    Description

      This is about to enforce the following policy decided recently (MDLSITE-5873).

      Policy: Trailing comma in multi-line array declaration

      Since 20th May 2020, this rule applies:

      1. The uses of a trailing comma on multi-line array declaration is required in PHP and JS.
      2. It's NOT required to change all current old-style occurrences in the codebase. We'll follow a progressive approach here (new code and modified code)

      For example for the expected format:

      $foo = [
          'a',
          'b',
          'c',
      ];

       

      This issue is about to verify these details in the codechecker. Nothing more, nothing less.

      Attachments

        Issue Links

          Activity

            People

              moodle.com Moodle HQ
              sarjona Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: