Problem/Motivation

There is a recommendation to convert long arrays with more than 80 chars into multi-lines short arrays. As explained in the report of phpcs

FILE: ebt_basic_button/src/Plugin/Field/FieldWidget/EbtSettingsBasicButtonWidget.php
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 10 ERRORS AND 1 WARNING AFFECTING 6 LINES
-------------------------------------------------------------------------------------------------------------------------------------
   8 | WARNING | [x] Unused use statement
  60 | ERROR   | [ ] The array declaration extends to column 125 (the limit is 80). The array content should be split up over
     |         |     multiple lines
  60 | ERROR   | [ ] The array declaration extends to column 124 (the limit is 80). The array content should be split up over
     |         |     multiple lines
  71 | ERROR   | [ ] The array declaration extends to column 125 (the limit is 80). The array content should be split up over
     |         |     multiple lines
  71 | ERROR   | [ ] The array declaration extends to column 124 (the limit is 80). The array content should be split up over
     |         |     multiple lines
  97 | ERROR   | [ ] The array declaration extends to column 125 (the limit is 80). The array content should be split up over
     |         |     multiple lines
  97 | ERROR   | [ ] The array declaration extends to column 124 (the limit is 80). The array content should be split up over
     |         |     multiple lines
 114 | ERROR   | [ ] The array declaration extends to column 125 (the limit is 80). The array content should be split up over
     |         |     multiple lines
 114 | ERROR   | [ ] The array declaration extends to column 124 (the limit is 80). The array content should be split up over
     |         |     multiple lines
 162 | ERROR   | [ ] The array declaration extends to column 102 (the limit is 80). The array content should be split up over
     |         |     multiple lines
 162 | ERROR   | [ ] The array declaration extends to column 101 (the limit is 80). The array content should be split up over
     |         |     multiple lines
-------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

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

RenatoG created an issue. See original summary.

renatog’s picture

Status: Active » Needs review
omkar_yewale’s picture

Assigned: Unassigned » omkar_yewale
omkar_yewale’s picture

Assigned: omkar_yewale » Unassigned
Status: Needs review » Reviewed & tested by the community

!19 MR looks good, and all errors and warnings have been resolved.

  • RenatoG authored 0158f3f5 on 1.4.x
    Issue #3346153: Split arrays with more than 80 chars into multi-line...
levmyshkin’s picture

Hi Renato, omkar_yewale, thank you!

levmyshkin’s picture

Status: Reviewed & tested by the community » Fixed
levmyshkin’s picture

Status: Fixed » Closed (fixed)
omkar_yewale’s picture

Hi @levmyshkin, Not sure why the credits were not given me, I review the MR.

levmyshkin’s picture