Phpcs reports the following Drupal coding standard issues:

FILE: admin_user_path.info.yml
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
 1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-----------------------------------------------------------------------------------------------------------


FILE: admin_user_path.services.yml
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 6 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: tests/src/Funtional/AdminUserPathRouteTest.php
----------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 6 LINES
----------------------------------------------------------------------------------------------------------------------
  1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
  2 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
  6 | ERROR | [x] Doc comment short description must end with a full stop
  6 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
 17 | ERROR | [x] There must be exactly one newline after the class comment
 38 | ERROR | [x] Expected 1 blank line after function; 0 found
 39 | ERROR | [x] The closing brace for the class must have an empty line before it
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------


FILE: _config.yml
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 1 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: src/Form/AdminUserSettingsForm.php
-----------------------------------------------------------------------------------------------------------
FOUND 16 ERRORS AND 1 WARNING AFFECTING 17 LINES
-----------------------------------------------------------------------------------------------------------
  1 | ERROR   | [x] The PHP open tag must be followed by exactly one blank line
  2 | ERROR   | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
  4 | ERROR   | [x] Doc comment short description must end with a full stop
  9 | ERROR   | [x] When importing a class with "use", do not include a leading \
 10 | ERROR   | [x] When importing a class with "use", do not include a leading \
 11 | ERROR   | [x] When importing a class with "use", do not include a leading \
 14 | ERROR   | [x] Doc comment short description must end with a full stop
 17 | ERROR   | [x] Opening brace should be on the same line as the declaration
 27 | ERROR   | [x] Opening brace should be on the same line as the declaration
 29 | WARNING | [x] A comma should follow the last multiline array item. Found: 'admin_user_path.settings'
 44 | ERROR   | [x] Opening brace should be on the same line as the declaration
 60 | ERROR   | [x] Short array syntax must be used to define arrays
 65 | ERROR   | [x] Short array syntax must be used to define arrays
 70 | ERROR   | [x] Expected one space after the comma, 0 found
 76 | ERROR   | [x] Visibility must be declared on method "validateForm"
 77 | ERROR   | [x] Opening brace should be on the same line as the declaration
 96 | ERROR   | [x] Expected 1 blank line after function; 0 found
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 17 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: src/Routing/UserAlterRouting.php
----------------------------------------------------------------------------------------------------------------------
FOUND 17 ERRORS AFFECTING 14 LINES
----------------------------------------------------------------------------------------------------------------------
  1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
  2 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
  4 | ERROR | [x] Doc comment short description must end with a full stop
 17 | ERROR | [x] Opening brace should be on the same line as the declaration
 18 | ERROR | [ ] Missing short description in doc comment
 19 | ERROR | [x] Data types in @var tags need to be fully namespaced
 19 | ERROR | [x] Do not append variable name "$config_factory." to the type declaration in a member variable comment
 21 | ERROR | [ ] Class property $config_factory should use lowerCamel naming without underscores
 25 | ERROR | [x] There must be exactly one blank line before the tags in a doc comment
 25 | ERROR | [ ] Missing parameter comment
 25 | ERROR | [x] Data types in @param tags need to be fully namespaced
 27 | ERROR | [x] Visibility must be declared on method "__construct"
 28 | ERROR | [x] Opening brace should be on the same line as the declaration
 30 | ERROR | [x] Expected 1 blank line after function; 2 found
 40 | ERROR | [x] Opening brace should be on the same line as the declaration
 56 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 6
 62 | ERROR | [x] Expected 1 blank line after function; 0 found
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 14 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------
CommentFileSizeAuthor
#3 3142826-3.patch7.05 KBgaurav_drupal
#2 3142826-2.patch6.79 KBgaurav_drupal

Comments

Gaurav_drupal created an issue. See original summary.

gaurav_drupal’s picture

Assigned: gaurav_drupal » Unassigned
Status: Needs work » Needs review
StatusFileSize
new6.79 KB

Provided the patch, please review.

gaurav_drupal’s picture

StatusFileSize
new7.05 KB

The previous patch had an issue, provided the correct one.

  • lamliheUssama committed 027890a on 1.0.x
    Resolve Issue #3142826 by Gaurav_drupal: Drupal coding standards report
    
lamliheussama’s picture

Version: » 1.0.x-dev
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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