Problem/Motivation

The sniff, Drupal.Array.Array.LongLineDeclaration is not enabled.

Steps to reproduce

Proposed resolution

Enable Drupal.Array.Array.LongLineDeclaration in core/modules/*/Controller/*, core/modules/*/Database/*, and core/modules/*/Hook/* and core/modules/*/Controller/* directories.

There are no strict standards for how to split a call to a function across multiple lines. The changes try to be the best fit for readability and the current style used in the file or method.

Remaining tasks

Review

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3549727

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

quietone created an issue. See original summary.

quietone’s picture

Title: Fix LongLineDeclaration in module Hook directories » Fix LongLineDeclaration in module Hook and Controller directories
Issue summary: View changes
quietone’s picture

Title: Fix LongLineDeclaration in module Hook and Controller directories » Fix LongLineDeclaration in module Controller, Hook and Database directories
Issue summary: View changes
needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new91 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

quietone’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

LGTM!

quietone’s picture

Oh dear, I was not working on HEAD and HEAD had a work in progress commit. I reverted that and pulled latest changes again, and then rebased this branch again. That brings this back to were it should be. There were no new conflicts and this was git work so leaving at RTBC. I could have just reverted that work in progress commit but for what ever reason I did not.

longwave’s picture

Status: Reviewed & tested by the community » Needs work

Sorry, another one that needs rebase.

quietone’s picture

Status: Needs work » Needs review

Rebased and ran phpcs. That found 2 new files that needed changes. So, the last commit should be reviewed.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Had to apply locally as the gitlab diff was hard to read but looked at https://git.drupalcode.org/project/drupal/-/merge_requests/13374/diffs?c... and seems fine to me

quietone’s picture

On a self review I found that this had a commit for a different issue. I have reverted that and also removed an accidentally added blank line. Since the only change to the 'real' changes here was removing the blank line and linting is passing, I am leaving this at RTBC

longwave’s picture

Status: Reviewed & tested by the community » Needs work

Some more nits on this one to balance out brackets again.

quietone’s picture

Status: Needs work » Reviewed & tested by the community

@longwave, thanks. I do appreciate the second opinion. I like the flexibility of sniff but sometimes it is difficult to know what other contributors will like.

I accepted the suggestions and rebased. So, I think it is fine to restore RTBC in this case.

quietone’s picture

Another rebase dues to changes in phpcs.xml.dist. Leaving at RTBC

longwave’s picture

11.3.x has a difference in content_moderation.module that means this doesn't apply cleanly there, not sure what to do about this but it would be nice to keep 11.3.x and 11.x as close as possible so cherry-picking fixes is easier...

quietone’s picture

I made an 11.3 MR and applied the diff and got failures in ContentTranslationFormHooks which only exists in 11.x. It looks like the form hooks were moved from ContentTranslationHooks to ContentTranslationFormHooks. It was only one line affected and when viewing it again I chose to improve that one change in both versions.

  • longwave committed a3460c4f on 11.3.x
    task: #3549727 Fix LongLineDeclaration in module Controller, Hook and...
longwave’s picture

Version: 11.x-dev » 11.3.x-dev
Status: Reviewed & tested by the community » Fixed

Let's get this in in the gap before 11.3.0 - no functional changes, just formatting.

Committed and pushed 673fd32689e to 11.x and a3460c4f797 to 11.3.x. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • longwave committed 673fd326 on 11.x
    task: #3549727 Fix LongLineDeclaration in module Controller, Hook and...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.