Skip to content

Conversation

@traviswindsormoodle
Copy link

As per MDL-80349, updating the devdocs appropriately

@netlify
Copy link

netlify bot commented Dec 9, 2025

Deploy Preview for moodledevdocs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit a6b8bf8
🔍 Latest deploy log https://app.netlify.com/projects/moodledevdocs/deploys/693a34fc0eca210008404835
😎 Deploy Preview https://deploy-preview-1488--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
Contributor

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 standards documentation to discourage the use of $options arrays as function parameters, as per MDL-80349. The guidance promotes explicit, typed parameters over loosely-typed array parameters for better type safety and documentation.

Key Changes:

  • Added new section "Using arrays for options as arguments" discouraging the practice
  • Provided both invalid and valid examples showing the preferred approach with explicit, typed parameters
  • Clarified that while arrays could be used in exceptional cases, explicit and typed parameters are strongly encouraged

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@andrewnicols andrewnicols left a comment

Choose a reason for hiding this comment

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

Thanks Travis.

I've got a few suggestions too. When you're happy with this, can you please squash the commits together too.

Cheers

Added guidelines for using arrays as function arguments, emphasizing explicit parameter listing and type definition.
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.

2 participants