Skip to content

MDLSITE-8442: Align braces to PSR-12 rules - #230

Draft
dpalou wants to merge 1 commit into
moodlehq:mainfrom
dpalou:MDLSITE-8442
Draft

dpalou wants to merge 1 commit into
moodlehq:mainfrom
dpalou:MDLSITE-8442

Conversation

@dpalou

@dpalou dpalou commented Jul 27, 2026

Copy link
Copy Markdown

No description provided.

@codecov

codecov Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.23%. Comparing base (24069c1) to head (63b5404).

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #230   +/-   ##
=========================================
  Coverage     99.23%   99.23%           
  Complexity     1018     1018           
=========================================
  Files            43       43           
  Lines          3009     3009           
=========================================
  Hits           2986     2986           
  Misses           23       23           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


class good_class_implements_newlines implements
something,
else

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

else is a reserved word, I think it's causing problems with the "phpcs-compatibility (^3)" job.

{
}

private function teset2(

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Typo: teset2. It won't cause any problems, but I guess we want to write it right :)


defined('MOODLE_INTERNAL') || die(); // Make this always the 1st line in all CS fixtures.

// These are wrong, ONE space before curly bracket is mandatory.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This comment (and the one above test05) describe the behaviour when using OpeningFunctionBraceKernighanRitchie, not the current behaviour. IMO it can be confusing.

My first idea was removing these comments, but it might be better to reword them so it's clear why we have 2 separate blocks of wrong functions and classes.

@dpalou
dpalou marked this pull request as ready for review November 6, 2026 07:22
@dpalou
dpalou marked this pull request as draft November 6, 2026 07:35
@andrewnicols

Copy link
Copy Markdown
Contributor

This looks good to me pending communication with the community regarding this set of changes.

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