Fix the issues reported by PHPCS

Created on 4 April 2023, over 1 year ago
Updated 11 August 2024, 4 months ago

Problem/Motivation

Fix the issues reported by PHPCS for Drupal and DrupalPractice standards in branch 2.0.x

Steps to reproduce

Execute the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig sales_zymphonies_theme/

Proposed resolution

Fix all the issues listed after executing the command

Remaining tasks

Fixed few issues, the remaining issues are listed below:

FILE: ...s/contrib/sales_zymphonies_theme/includes/fontawesome/css/font-awesome.css
--------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
--------------------------------------------------------------------------------
121 | ERROR | Style definitions must end with a semicolon
127 | ERROR | Style definitions must end with a semicolon
133 | ERROR | Style definitions must end with a semicolon
139 | ERROR | Style definitions must end with a semicolon
145 | ERROR | Style definitions must end with a semicolon
--------------------------------------------------------------------------------

FILE: ...ontrib/sales_zymphonies_theme/includes/smartmenus/jquery.smartmenus.min.js
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
--------------------------------------------------------------------------------

FILE: ...ules/contrib/sales_zymphonies_theme/includes/bootstrap/js/bootstrap.min.js
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
--------------------------------------------------------------------------------

FILE: ...es/contrib/sales_zymphonies_theme/includes/bootstrap/css/bootstrap.min.css
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
--------------------------------------------------------------------------------

FILE: ...trib/sales_zymphonies_theme/includes/bootstrap/css/bootstrap-theme.min.css
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
--------------------------------------------------------------------------------

FILE: ...rib/sales_zymphonies_theme/includes/flexslider/js/jquery.flexslider-min.js
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
--------------------------------------------------------------------------------

FILE: ...l8/web/modules/contrib/sales_zymphonies_theme/sales_zymphonies_theme.theme
--------------------------------------------------------------------------------
FOUND 6 ERRORS AND 5 WARNINGS AFFECTING 6 LINES
--------------------------------------------------------------------------------
123 | ERROR | Doc comment short description must be on a single line,
| | further text should be a separate paragraph
256 | WARNING | Translatable strings must not begin or end with white spaces,
| | use placeholders with t() for variables
256 | ERROR | Concatenating translatable strings is not allowed, use
| | placeholders instead and only one string literal
263 | WARNING | Translatable strings must not begin or end with white spaces,
| | use placeholders with t() for variables
263 | ERROR | Concatenating translatable strings is not allowed, use
| | placeholders instead and only one string literal
270 | WARNING | Translatable strings must not begin or end with white spaces,
| | use placeholders with t() for variables
270 | ERROR | Concatenating translatable strings is not allowed, use
| | placeholders instead and only one string literal
276 | WARNING | Translatable strings must not begin or end with white spaces,
| | use placeholders with t() for variables
276 | ERROR | Concatenating translatable strings is not allowed, use
| | placeholders instead and only one string literal
282 | WARNING | Translatable strings must not begin or end with white spaces,
| | use placeholders with t() for variables
282 | ERROR | Concatenating translatable strings is not allowed, use
| | placeholders instead and only one string literal
--------------------------------------------------------------------------------

Time: 2.15 secs; Memory: 28MB

Please review the patch for fixing few errors and warnings.

šŸ“Œ Task
Status

RTBC

Version

2.0

Component

Code

Created by

šŸ‡®šŸ‡³India urvashi_vora Madhya Pradesh, India

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

  • Issue created by @urvashi_vora
  • šŸ‡µšŸ‡­Philippines paraderojether

    Hi urvashi_vora

    I reviewed patch coding-standard-fixes.patch, and there are still remaining errors and warning shown below:

    FILE: ...udenttrainees/New/drupalorgsite/docroot/themes/contrib/sales_zymphonies_theme/sales_zymphonies_theme.theme
    ----------------------------------------------------------------------------------------------------------------
    FOUND 6 ERRORS AND 5 WARNINGS AFFECTING 6 LINES
    ----------------------------------------------------------------------------------------------------------------
    123 | ERROR | Doc comment short description must be on a single line, further text should be a separate
    | | paragraph
    256 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for
    | | variables
    256 | ERROR | Concatenating translatable strings is not allowed, use placeholders instead and only one
    | | string literal
    263 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for
    | | variables
    263 | ERROR | Concatenating translatable strings is not allowed, use placeholders instead and only one
    | | string literal
    270 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for
    | | variables
    270 | ERROR | Concatenating translatable strings is not allowed, use placeholders instead and only one
    | | string literal
    276 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for
    | | variables
    276 | ERROR | Concatenating translatable strings is not allowed, use placeholders instead and only one
    | | string literal
    282 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t() for
    | | variables
    282 | ERROR | Concatenating translatable strings is not allowed, use placeholders instead and only one
    | | string literal
    ----------------------------------------------------------------------------------------------------------------

    FILE: .../New/drupalorgsite/docroot/themes/contrib/sales_zymphonies_theme/includes/fontawesome/css/font-awesome.css
    ----------------------------------------------------------------------------------------------------------------
    FOUND 5 ERRORS AFFECTING 5 LINES
    ----------------------------------------------------------------------------------------------------------------
    121 | ERROR | Style definitions must end with a semicolon
    127 | ERROR | Style definitions must end with a semicolon
    133 | ERROR | Style definitions must end with a semicolon
    139 | ERROR | Style definitions must end with a semicolon
    145 | ERROR | Style definitions must end with a semicolon
    ----------------------------------------------------------------------------------------------------------------

    Time: 923ms; Memory: 20MB

    Please check.
    Thank You.

  • šŸ‡®šŸ‡³India urvashi_vora Madhya Pradesh, India

    Hi @paraderojether,

    Yes, I have added them in Remaining tasks.

  • Status changed to Needs review over 1 year ago
  • šŸ‡®šŸ‡³India sakthi_dev

    Created a patch. Please review,

  • Status changed to RTBC 4 months ago
  • šŸ‡µšŸ‡­Philippines clarkssquared

    Hi

    I applied the patch #4 and I confirmed that it fixes the PHPCS issues,

    āžœ  sales_zymphonies_theme git:(8.x-1.x) curl https://www.drupal.org/files/issues/2023-05-03/phpcs-issue-3352125-4.patch | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  118k  100  118k    0     0   216k      0 --:--:-- --:--:-- --:--:--  224k
    patching file 'config/install/sales_zymphonies_theme.settings.yml'
    patching file 'config/optional/block.block.sales_zymphonies_theme_page_title.yml'
    patching file 'css/global.css'
    patching file 'css/media.css'
    patching file 'includes/bootstrap/js/bootstrap.js'
    patching file 'includes/fontawesome/css/font-awesome.css'
    patching file 'includes/smartmenus/sm-core-css.css'
    patching file 'js/custom.js'
    patching file sales_zymphonies_theme.info.yml
    patching file sales_zymphonies_theme.libraries.yml
    patching file sales_zymphonies_theme.theme
    āžœ  sales_zymphonies_theme git:(8.x-1.x) āœ— ..
    āžœ  drupal_local git:(main) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml sales_zymphonies_theme
    
    FILE: ...ts/d10/drupal_local/sales_zymphonies_theme/sales_zymphonies_theme.info.yml
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     1 | WARNING | Remove "project" from the info file, it will be added by
       |         | drupal.org packaging automatically
     1 | WARNING | Remove "datestamp" 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
    --------------------------------------------------------------------------------
    
    Time: 904ms; Memory: 20MB
    
    āžœ  drupal_local git:(main) āœ— 
    
Production build 0.71.5 2024