Fix the issues reported by phpcs

Created on 9 May 2023, over 1 year ago
Updated 11 May 2023, over 1 year ago

Problem/Motivation

Fix phpcs issues.


vendor/bin/phpcs   --standard="Drupal,DrupalPractice" -n    --extensions="php,module,inc,install,test,profile,theme,yml" web/modules/sass_compile/

FILE: /web/modules/sass_compile/drush.services.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: /web/modules/sass_compile/src/SassCompileService.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 24 ERRORS AFFECTING 20 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
 14 | ERROR | [ ] Missing short description in doc comment
 32 | ERROR | [x] Parameter comment must be on the next line
 32 | ERROR | [x] Parameter comment must end with a full stop
 33 | ERROR | [x] Parameter comment must be on the next line
 33 | ERROR | [x] Parameter comment must end with a full stop
 34 | ERROR | [x] Separate the @param and @return sections by a blank line.
 34 | ERROR | [ ] Description for the @return value is missing
 35 | ERROR | [x] Separate the @return and @throws sections by a blank line.
 40 | ERROR | [x] Expected 1 space after IF keyword; 0 found
 48 | ERROR | [x] Expected 1 space after WHILE keyword; 0 found
 51 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 54 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 55 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
 57 | ERROR | [x] No space found before comment text; expected "// Leafo\ScssPhp\Formatter\Expanded" but found
    |       |     "//Leafo\ScssPhp\Formatter\Expanded"
 58 | ERROR | [x] No space found before comment text; expected "// Leafo\ScssPhp\Formatter\Nested (default)" but found
    |       |     "//Leafo\ScssPhp\Formatter\Nested (default)"
 59 | ERROR | [x] No space found before comment text; expected "// Leafo\ScssPhp\Formatter\Compressed" but found
    |       |     "//Leafo\ScssPhp\Formatter\Compressed"
 60 | ERROR | [x] No space found before comment text; expected "// Leafo\ScssPhp\Formatter\Compact" but found
    |       |     "//Leafo\ScssPhp\Formatter\Compact"
 61 | ERROR | [x] No space found before comment text; expected "// Leafo\ScssPhp\Formatter\Crunched" but found
    |       |     "//Leafo\ScssPhp\Formatter\Crunched"
 61 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 63 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 66 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 80 | ERROR | [x] Expected newline after closing brace
 85 | ERROR | [x] Expected newline after closing brace
 94 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 22 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------


FILE: /web/modules/sass_compile/src/Form/SassCompileConfigForm.php
------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
------------------------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 59 | ERROR | [x] Expected 1 space after IF keyword; 0 found
 66 | ERROR | [x] Expected 1 blank line after function; 0 found
 67 | ERROR | [x] The closing brace for the class must have an empty line before it
------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------


FILE: /web/modules/sass_compile/src/SassCompileServiceInterface.php
-------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
-------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------


FILE: /web/modules/sass_compile/src/Commands/SassCompileCommands.php
--------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 5 LINES
--------------------------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 15 | ERROR | [ ] Parameter $options is not described in comment
 21 | ERROR | [ ] Parameter tags must be grouped together in a doc comment
 29 | ERROR | [x] Expected 1 blank line before function; 0 found
 34 | ERROR | [x] Expected 1 newline at end of file; 0 found
 34 | ERROR | [x] The closing brace for the class must have an empty line before it
--------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------


FILE: /web/modules/sass_compile/sass_compile.links.menu.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
-----------------------------------------------------------------------------------------

Time: 164ms; Memory: 10MB

Steps to reproduce

Run the following command.

vendor/bin/phpcs --standard="Drupal,DrupalPractice" -n --extensions="php,module,inc,install,test,profile,theme,yml" web/modules/sass_compile/

Proposed resolution

vendor/bin/phpcbf --standard="Drupal,DrupalPractice" -n --extensions="php,module,inc,install,test,profile,theme,yml" web/modules/sass_compile/

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India Nishant

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024