Problem/Motivation

Getting following error/warnings

FILE: /app/modules/contrib/publishcontent/publishcontent.links.task.yml
-----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------
5 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------

FILE: /app/modules/contrib/publishcontent/src/Controller/PublishContentPublishEntity.php
--------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------
138 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
165 | ERROR | Public method name "PublishContentPublishEntity::hasUILocalTask" is not in lowerCamel format
--------------------------------------------------------------------------------------------------------------

FILE: /app/modules/contrib/publishcontent/src/Form/PublishContentSettings.php
-----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
13 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
-----------------------------------------------------------------------------------------------------------------

FILE: /app/modules/contrib/publishcontent/src/Plugin/Menu/LocalTask/PublishContentLocalTask.php
-----------------------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 5 LINES
-----------------------------------------------------------------------------------------------
77 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
79 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
79 | ERROR | [x] Concat operator must be surrounded by a single space
80 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
82 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
83 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
83 | ERROR | [x] Closing brace indented incorrectly; expected 2 spaces, found 4
-----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------

FILE: /app/modules/contrib/publishcontent/src/Plugin/views/field/PublishContentNode.php
---------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------
64 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
---------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------

Time: 1.29 secs; Memory: 10MB

Steps to reproduce

Run following command

phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml modules/contrib/publishcontent/

Proposed resolution

Above error/warnings need to be fixed

Comments

samit.310@gmail.com created an issue. See original summary.

samitk’s picture

Assigned: samitk » Unassigned
Status: Needs work » Needs review
StatusFileSize
new4.87 KB

Issue fixed.

sourabhjain’s picture

Assigned: Unassigned » sourabhjain

I will review this.

sourabhjain’s picture

Assigned: sourabhjain » Unassigned
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new1.27 MB
new145.02 KB

I have reviewed patch #2 and its working fine. Moving it to RTBC.

  • rodrigoaguilera committed 01b4313 on 8.x-1.x
    Issue #3327032 by samit.310@gmail.com: Drupal Coding Standards Issues |...
rodrigoaguilera’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the patch and the review

Status: Fixed » Closed (fixed)

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