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

Determine support for fluent interfaces

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.0
    • Fix Version/s: None
    • Component/s: Local: Code checker
    • Labels:
      None
    • Affected Branches:
      MOODLE_30_STABLE

      Description

      Currently Code Checker does not allow code formatted like so:

      $foo->func1()
          ->func2()
          ->func3();
      

      This is not widely used in Moodle code, but it could with adoption of 3rd party libraries and it is often used with mocks in PHPUnit.

      Goals of this ticket:

      1. Agree how we do support it (-> aligned vs existing wrapping rules).
      2. Decide if we allow it globally (+1) or restricted to tests dirs (-1).
      3. Implement it in the coding style documentation and code checker.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: