Problem/Motivation

Code examples in the documentation for \Drupal\Core\Render\RendererInterface::render() are using the old array declaration style of array('key' => 'value') rather than the short array declarations, ['key' => 'value'], as per the Drupal coding standard.

Steps to reproduce

View the code examples in the documentation documentation: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21...

Proposed resolution

Update the documentation.

Remaining tasks

None

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

TBD

Comments

Jaypan created an issue. See original summary.

jaypan’s picture

Status: Active » Needs review
StatusFileSize
new1.54 KB
smustgrave’s picture

Priority: Normal » Minor
Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative

Good catch!

quietone’s picture

Status: Reviewed & tested by the community » Closed (duplicate)
Issue tags: +Coding standards
Related issues: +#2874067: Fix Drupal.Commenting.DocCommentLongArraySyntax coding standard

Yes, this needs to be done but coding standard fixes are done by rule, not individual file. There is an existing issue for this and it already includes the changes to RenderInterface. I am adding that issue as a related issue. You are more than welcome to work on that issue to get the task done.

Therefor, I am closing this as duplicate.

jaypan’s picture

And once again I've wasted time doing work on core. Never again.