Skip to content

[docs] Updating coding style per MDLSITE-7597 #1391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andrewnicols
Copy link
Member

This change updates the coding style to remove legacy line wrapping rules, and other parts which are explicitly defined by PSR-12.

This change updates the coding style to remove legacy line wrapping
rules, and other parts which are explicitly defined by PSR-12.
Copy link

netlify bot commented Jul 2, 2025

Deploy Preview for moodledevdocs ready!

Name Link
🔨 Latest commit 225eede
🔍 Latest deploy log https://app.netlify.com/projects/moodledevdocs/deploys/6864810fc5211e00085d67f3
😎 Deploy Preview https://deploy-preview-1391--moodledevdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the Moodle coding style guide by removing legacy line-wrapping and indentation rules that are now covered by PSR-12, and streamlining naming conventions.

  • Removes custom indentation and wrapping examples in favor of PSR-12 defaults
  • Simplifies function/method naming rules and scopes Frankenstyle prefix to legacy globals
  • Adds clarity notes around “de-facto Moodle standards” and ongoing code modernization
Comments suppressed due to low confidence (2)

general/development/policies/codingstyle/index.md:70

  • [nitpick] After removing the dedicated 'Indentation' section, consider adding a brief reference to PSR-12's default indentation rules or linking to the relevant PSR-12 documentation so readers know where to find them.
SQL queries use special indentation, see [SQL coding style](./sql.md).

general/development/policies/codingstyle/index.md:265

  • [nitpick] To avoid ambiguity, it may help to include a concrete example of a legacy function name using the Frankenstyle prefix to illustrate the expected format.
Method and function names should be simple English lowercase words. Words should be separated by underscores.

@andrewnicols
Copy link
Member Author

Change to the coding style: moodlehq/moodle-cs#201

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant