When I run the module on phpcs, following errors are listed:


FILE: ...l/drupal-8.4.3/modules/editor_md/src/Plugin/Editor/editor_md.php
----------------------------------------------------------------------
FOUND 15 ERRORS AFFECTING 14 LINES
----------------------------------------------------------------------
   1 | ERROR | [x] The PHP open tag must be followed by exactly one
     |       |     blank line
   2 | ERROR | [x] There must be one blank line after the namespace
     |       |     declaration
  10 | ERROR | [x] There must be one blank line after the last USE
     |       |     statement; 0 found;
  25 | ERROR | [ ] Class name must begin with a capital letter
  25 | ERROR | [ ] Class name must use UpperCamel naming without
     |       |     underscores
  60 | ERROR | [x] Expected 1 blank line before function; 0 found
  65 | ERROR | [x] Expected 1 blank line after function; 0 found
  78 | ERROR | [x] Expected 1 blank line after function; 0 found
  84 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
     |       |     "FALSE" but found "false"
  86 | ERROR | [x] Expected 1 blank line after function; 0 found
  98 | ERROR | [x] Expected 1 blank line after function; 0 found
 104 | ERROR | [x] Expected 1 blank line after function; 0 found
 114 | ERROR | [x] Expected 1 blank line after function; 0 found
 124 | ERROR | [x] Expected 1 blank line after function; 0 found
 125 | ERROR | [x] The closing brace for the class must have an empty
     |       |     line before it
----------------------------------------------------------------------
PHPCBF CAN FIX THE 13 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

Comments

Venkatesh Rajan.J created an issue. See original summary.

venkatesh rajan.j’s picture

Status: Active » Needs review
StatusFileSize
new2.18 KB

Attached the patch. Please review.

a65162’s picture

Status: Needs review » Fixed
sivaprasadc’s picture

Status: Fixed » Needs review
StatusFileSize
new28.05 KB
new503 bytes

@Venkatesh Rajan.J

Thanks for the patch.

@a65162

Still few coding standard issues are there. Please find the attached screenshot.

I hope the patch file will resolve the issue. Please review it.

a65162’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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