Problem/Motivation

FILE: /var/www/html/web/modules/custom/ief_complex_open/src/Plugin/Field/FieldWidget/InlineEntityFormComplexOpen.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 16 ERRORS AND 5 WARNINGS AFFECTING 21 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
  27 | ERROR   | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
  74 | ERROR   | [ ] The array declaration extends to column 86 (the limit is 80). The array content should be split up over multiple lines
  82 | WARNING | [x] 'TODO - does this belong in #element_validate?' should match the format '@todo Fix problem X here.'
 139 | ERROR   | [ ] The array declaration extends to column 84 (the limit is 80). The array content should be split up over multiple lines
 145 | ERROR   | [ ] The array declaration extends to column 88 (the limit is 80). The array content should be split up over multiple lines
 268 | WARNING | [ ] Unused variable $hide_cancel.
 273 | WARNING | [ ] Unused variable $hide_cancel.
 284 | ERROR   | [ ] The array declaration extends to column 85 (the limit is 80). The array content should be split up over multiple lines
 287 | WARNING | [ ] Unused variable $hide_cancel.
 293 | ERROR   | [ ] The array declaration extends to column 83 (the limit is 80). The array content should be split up over multiple lines
 295 | ERROR   | [ ] Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
 322 | ERROR   | [ ] Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
 327 | WARNING | [ ] Line exceeds 80 characters; contains 91 characters
 334 | ERROR   | [ ] The array declaration extends to column 101 (the limit is 80). The array content should be split up over multiple lines
 381 | ERROR   | [ ] Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
 406 | ERROR   | [ ] The array declaration extends to column 86 (the limit is 80). The array content should be split up over multiple lines
 416 | ERROR   | [ ] Parameter $reference_form is not described in comment
 418 | ERROR   | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
 424 | ERROR   | [ ] Missing parameter type
 426 | ERROR   | [ ] Missing parameter type
 431 | ERROR   | [ ] Public method name "InlineEntityFormComplexOpen::reference_form_submit" is not in lowerCamel format
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

Run the command phpcs --standard="DrupalPractice,Drupal" ief_complex_open

Proposed resolution

Resolve coding standard issue and create the patch.

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

arunkumark created an issue. See original summary.

arunkumark’s picture

Assigned: arunkumark » Unassigned
Status: Active » Needs work

Need to fix remaining Coding standard issues.

aakansha tyagi’s picture

Assigned: Unassigned » aakansha tyagi
aakansha tyagi’s picture

Assigned: aakansha tyagi » Unassigned
Status: Needs work » Needs review
StatusFileSize
new7.13 KB

I have fixed the above coding standards issues. Please review it.

bindu r’s picture

StatusFileSize
new31.53 KB

Hi, patch #5 applied cleanly, fixing most of the errors. One error still needs to be fixed.

Jasjeet Kaur Brar made their first commit to this issue’s fork.

mlncn’s picture

Status: Needs review » Needs work

nilesh.addweb made their first commit to this issue’s fork.

nilesh.addweb’s picture

Status: Needs work » Needs review

Hi,
I have fixed remaining phpcs issues and fixed conflict from upstream. please review it.

riddhi.addweb’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new24.38 KB
new171.88 KB

The mentioned phpcs issue is resolved, & I have also checked and it is working as expected. I am attaching the Screenshots & doing RTBC for the same.

riddhi.addweb’s picture

Ignore this Screenshot

  • mlncn committed 110dd786 on 1.0.x
    Issue #3346172 by arunkumark, nilesh.addweb, aakansha tyagi, Jasjeet...

  • mlncn committed 16ad9239 on 1.0.x
    Issue #3346172 by mlncn: Fix incorrect param info that slipped in
    
mlncn’s picture

Title: Fix the issues reported by phpcs » Fix the issues reported by phpcs (selectively)
Status: Reviewed & tested by the community » Fixed

I'm giving credit on this issue but not taking a lot of the changes. Maybe someone can explain while i should care someday but until then i am not making perfectly readable 89 character lines into three less readable ones because phpcs tells me too.

A fair number of the warnings appear to be at odds with Drupal's coding standards (not allowing inline doc block comments that start with /**??)

For modules i maintain please check with me before undertaking these sorts of patches, please.

(The merge request also commented out a couple variables which is absolutely not OK in a formatting patch!)

Status: Fixed » Closed (fixed)

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