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

Coding style guide should specify to use stdClass and not object in stdClass

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • Coding style
    • None

    Description

      While testing MDL-18162, it was realised that, there is no mention of using stdClass in phpdocs on Coding style guide.
      It would be nice to get this documented, as this was discussed a while back and seems not documented. Reasons for using stdClass

      1. Object is vague and doesn't tell much about passed param
      2. Before Moodle 2.0, we used to define a class object extending stdClass, and use new object(); This has now been deprecated. Please use stdClass instead. http://docs.moodle.org/dev/Coding_style#Classes

      Attachments

        Issue Links

          Activity

            People

              poltawski Dan Poltawski
              rajeshtaneja Rajesh Taneja
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Clockify

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.