FILE: /var/www/html/tolearn/modules/git/background_image_formatter/src/Plugin/Field/FieldFormatter/BackgroundImageFormatter.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 10 ERRORS AND 1 WARNING AFFECTING 7 LINES
-------------------------------------------------------------------------------------------------------------------------------
  95 | ERROR   | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
 118 | ERROR   | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
 139 | WARNING | [ ] Line exceeds 80 characters; contains 93 characters
 139 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, colons, question marks, or closing parentheses
 146 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, colons, question marks, or closing parentheses
 147 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
 147 | ERROR   | [x] There should be no white space after an opening "("
 147 | ERROR   | [x] There should be no white space before a closing ")"
 147 | ERROR   | [x] Expected 1 space after closing parenthesis; found 0
 186 | ERROR   | [x] Missing function doc comment
 190 | ERROR   | [x] Missing function doc comment
-------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/tolearn/modules/git/background_image_formatter/background_image_formatter.module
----------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
----------------------------------------------------------------------------------------------------

Comments

deepanker_bhalla created an issue. See original summary.

deepanker_bhalla’s picture

Status: Needs work » Needs review
StatusFileSize
new2.55 KB

Fixed the reported issues.

deepanker_bhalla’s picture

StatusFileSize
new4.38 KB

I have found some more issues after checking with the latest versions. Thus updating the latest patch with all the resolved issues.

msankhala’s picture

Status: Needs review » Reviewed & tested by the community

@deepanker_bhalla Good work. I can confirm the patch #3 is applying cleanly and fixing all the coding standard reported by the PHPCS. Here is the output:

❯ background_image_formatter 8.x-1.x* git apply -v 3002401-coding-standard-3.patch
Checking patch README.txt...
Checking patch background_image_formatter.module...
Checking patch src/Plugin/Field/FieldFormatter/BackgroundImageFormatter.php...
Applied patch README.txt cleanly.
Applied patch background_image_formatter.module cleanly.
Applied patch src/Plugin/Field/FieldFormatter/BackgroundImageFormatter.php cleanly.

❯ background_image_formatter 8.x-1.x* phpcs --standard=Drupal .

❯ background_image_formatter 8.x-1.x*

PHPCS is reporting no coding standard warning after applying the patch #3.

zulljin’s picture

Status: Reviewed & tested by the community » Fixed

Good job.

Status: Fixed » Closed (fixed)

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