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

Coding style braces definition

    XMLWordPrintable

    Details

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

      Description

      I believe that it is the standard that braces '{}' are on the same line as statements, i.e.

      if (true) {

      // Always do this.

      } else {

      // Never do this.

      }

      rather than:

      if (true)

      {

      // Always do this.

      }

      else

      {

      // Never do this.

      }

      but this is not documented on: https://docs.moodle.org/dev/Coding_style.

      Raising issue because the 'Talk' page above states to.

        Attachments

          Activity

            People

            Assignee:
            poltawski Dan Poltawski
            Reporter:
            gb2048 Gareth J Barnard
            Participants:
            Component watchers:
            Marina Glancy, Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: