Fix the issues reported by phpcs

Created on 23 June 2023, over 1 year ago
Updated 8 July 2024, 5 months ago

Problem/Motivation

Fix the issue reported by phpcs command

Used command:- ./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/themes/custom/corporate_lite

Even after using phpcbf command still there are so many issue found.

Steps to reproduce

FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/themes/custom/corporate_lite/css/components/dropdowns.css
-------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------
32 | ERROR | Style definitions must end with a semicolon
-------------------------------------------------------------------------------------------------------------------

FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/themes/custom/corporate_lite/css/components/inverted-header.css
-------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------
41 | ERROR | Style definitions must end with a semicolon
-------------------------------------------------------------------------------------------------------------------------

FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/themes/custom/corporate_lite/css/components/social-links.css
----------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------
41 | ERROR | Style definitions must end with a semicolon
----------------------------------------------------------------------------------------------------------------------

FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/themes/custom/corporate_lite/css/components/forms.css
---------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------
130 | ERROR | Style definitions must end with a semicolon
---------------------------------------------------------------------------------------------------------------

FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/themes/custom/corporate_lite/css/components/menu.css
--------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------
805 | ERROR | Class definition is empty
--------------------------------------------------------------------------------------------------------------

FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/themes/custom/corporate_lite/css/components/owl-carousel-global.css
-----------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------
66 | ERROR | Style definitions must end with a semicolon
-----------------------------------------------------------------------------------------------------------------------------

FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/themes/custom/corporate_lite/css/components/tables.css
----------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------
56 | ERROR | Style definitions must end with a semicolon
----------------------------------------------------------------------------------------------------------------

FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/themes/custom/corporate_lite/css/theme/local-theme.css
----------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Additional whitespace found at start of file
----------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------

FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/themes/custom/corporate_lite/js/waypoints/shortcuts/inview.min.js
---------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
---------------------------------------------------------------------------------------------------------------------------

FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/themes/custom/corporate_lite/js/waypoints/shortcuts/sticky.min.js
---------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
---------------------------------------------------------------------------------------------------------------------------

FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/themes/custom/corporate_lite/js/waypoints/jquery.waypoints.min.js
---------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
---------------------------------------------------------------------------------------------------------------------------

FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/themes/custom/corporate_lite/js/magnific-popup/jquery.magnific-popup.min.js
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
-------------------------------------------------------------------------------------------------------------------------------------

FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/themes/custom/corporate_lite/js/magnific-popup/jquery.magnific-popup.js
---------------------------------------------------------------------------------------------------------------------------------
FOUND 10 ERRORS AFFECTING 10 LINES
---------------------------------------------------------------------------------------------------------------------------------
1106 | ERROR | String concat is not required here; use a single string instead
1107 | ERROR | String concat is not required here; use a single string instead
1108 | ERROR | String concat is not required here; use a single string instead
1109 | ERROR | String concat is not required here; use a single string instead
1110 | ERROR | String concat is not required here; use a single string instead
1113 | ERROR | String concat is not required here; use a single string instead
1114 | ERROR | String concat is not required here; use a single string instead
1115 | ERROR | String concat is not required here; use a single string instead
1116 | ERROR | String concat is not required here; use a single string instead
1544 | ERROR | String concat is not required here; use a single string instead
---------------------------------------------------------------------------------------------------------------------------------

FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/themes/custom/corporate_lite/js/slideout/slideout.min.js
------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
------------------------------------------------------------------------------------------------------------------

FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/themes/custom/corporate_lite/js/mt-modernizr/mt-modernizr.js
----------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
----------------------------------------------------------------------------------------------------------------------

FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/themes/custom/corporate_lite/js/flexslider/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: /Users/ashutoshahirwal/Sites/lando/contribution/web/themes/custom/corporate_lite/js/flexslider/changelog.txt
------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------------
13 | WARNING | Line exceeds 80 characters; contains 103 characters
33 | WARNING | Line exceeds 80 characters; contains 96 characters
36 | WARNING | Line exceeds 80 characters; contains 111 characters
------------------------------------------------------------------------------------------------------------------

FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/themes/custom/corporate_lite/js/flexslider/jquery.flexslider.js
-------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------------------------------
885 | ERROR | [ ] Blank lines are not allowed after DEFAULT statements
1115 | ERROR | [x] Inline control structures are not allowed
1136 | ERROR | [x] Inline control structures are not allowed
-------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------

FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/themes/custom/corporate_lite/js/owl-carousel/README.md
----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 7 WARNINGS AFFECTING 7 LINES
----------------------------------------------------------------------------------------------------------------
37 | WARNING | Line exceeds 80 characters; contains 92 characters
41 | WARNING | Line exceeds 80 characters; contains 96 characters
44 | WARNING | Line exceeds 80 characters; contains 114 characters
61 | WARNING | Line exceeds 80 characters; contains 166 characters
74 | WARNING | Line exceeds 80 characters; contains 116 characters
95 | WARNING | Line exceeds 80 characters; contains 81 characters
98 | WARNING | Line exceeds 80 characters; contains 100 characters
----------------------------------------------------------------------------------------------------------------

FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/themes/custom/corporate_lite/js/owl-carousel/owl.carousel.min.js
--------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
--------------------------------------------------------------------------------------------------------------------------

FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/themes/custom/corporate_lite/corporate_lite.theme
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AND 3 WARNINGS AFFECTING 10 LINES
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
74 | WARNING | Line exceeds 80 characters; contains 94 characters
81 | WARNING | Line exceeds 80 characters; contains 89 characters
138 | ERROR | Doc comment is empty
180 | ERROR | Doc comment is empty
700 | ERROR | Doc comment is empty
748 | ERROR | Doc comment is empty
805 | WARNING | Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements
| | hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates."
818 | ERROR | Doc comment is empty
827 | ERROR | Doc comment is empty
834 | ERROR | Doc comment is empty
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/themes/custom/corporate_lite/theme-settings.php
---------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
---------------------------------------------------------------------------------------------------------
3 | ERROR | Missing short description in doc comment
7 | ERROR | Doc comment is empty
121 | WARNING | Avoid backslash escaping in translatable strings when possible, use "" quotes instead
---------------------------------------------------------------------------------------------------------

Time: 3.03 secs; Memory: 54MB

๐Ÿ“Œ Task
Status

Needs work

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia Prachi6824

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

Merge Requests

Comments & Activities

  • Issue created by @Prachi6824
  • Assigned to Prachi6824
  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Prachi6824

    Hello,

    I have created a patch to solve all the errors related to phpcs code standard within the slideout.css file .
    Please review and apply it .

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Prachi6824

    Hello,

    I have recreated a patch as above 3368319-#2 failed to solve all the errors related to phpcs code standard within the slideout.css file .
    Please review and apply it .

  • Issue was unassigned.
  • Status changed to Needs work 9 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Ashutosh Ahirwal India

    Hi I reviewed it but there are so many issue found related to phpcs issue updating the issue description.
    Need work on it.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia pray_12

    Hi,
    Created the patch which fexes few errors and there are few errors and warnings need to be addressed.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Yashaswi18

    This patch fixes some more errors, there are still some errors that needs to be addressed

  • Fixed some phpcs errors and warnings in the above patch.

  • Status changed to Needs review 8 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Shank115
  • Status changed to Needs work 8 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Yashaswi18

    I applied the patch from #7. However, there are still several issues remaining, primarily in JavaScript and CSS files. Do these need to be addressed? Please check.

  • Assigned to nitin_lama
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia nitin_lama India
  • Merge request !5#3368906: MR for the changes. โ†’ (Open) created by nitin_lama
  • First commit to issue fork.
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia nitin_lama India

    MR created for the changes.

  • Issue was unassigned.
  • Status changed to Needs review 8 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia nitin_lama India
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia shivamsen_12579 Bhopal
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia hetal.solanki

    Hetal.Solanki โ†’ made their first commit to this issueโ€™s fork.

  • Status changed to Needs work 5 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia bhaveshdas

    I have checked MR 5 I found some issue.
    please use this command to see error :--
    vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig modules/custom/corporate_lite-3368906/

    FILE: /var/www/html/drupal-contri-d10/modules/custom/corporate_lite-3368906/js/slideout/slideout.min.js
    -------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------
     1 | WARNING | File appears to be minified and cannot be processed
    -------------------------------------------------------------------------------------------------------
    
    
    FILE: /var/www/html/drupal-contri-d10/modules/custom/corporate_lite-3368906/js/slideout/slideout.js
    ---------------------------------------------------------------------------------------------------
    FOUND 8 ERRORS AFFECTING 3 LINES
    ---------------------------------------------------------------------------------------------------
       1 | ERROR | [x] Opening brace must be the last content on the line
       1 | ERROR | [x] Opening brace must be the last content on the line
       1 | ERROR | [x] Opening brace must be the last content on the line
       1 | ERROR | [x] Expected 1 space before opening brace; found 0
       1 | ERROR | [x] Opening brace must be the last content on the line
       1 | ERROR | [x] Expected 1 space before opening brace; found 0
       3 | ERROR | [x] Opening brace must be the last content on the line
     366 | ERROR | [x] Opening brace must be the last content on the line
    ---------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------
    
    
    FILE: /var/www/html/drupal-contri-d10/modules/custom/corporate_lite-3368906/js/waypoints/jquery.waypoints.min.js
    ----------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------------
     1 | WARNING | File appears to be minified and cannot be processed
    ----------------------------------------------------------------------------------------------------------------
    
    
    FILE: /var/www/html/drupal-contri-d10/modules/custom/corporate_lite-3368906/js/waypoints/shortcuts/inview.min.js
    ----------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------------
     1 | WARNING | File appears to be minified and cannot be processed
    ----------------------------------------------------------------------------------------------------------------
    
    
    FILE: /var/www/html/drupal-contri-d10/modules/custom/corporate_lite-3368906/js/waypoints/shortcuts/sticky.min.js
    ----------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------------
     1 | WARNING | File appears to be minified and cannot be processed
    ----------------------------------------------------------------------------------------------------------------
    
    
    FILE: /var/www/html/drupal-contri-d10/modules/custom/corporate_lite-3368906/js/mt-modernizr/mt-modernizr.js
    -----------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------
     1 | WARNING | File appears to be minified and cannot be processed
    -----------------------------------------------------------------------------------------------------------
    
    
    FILE: /var/www/html/drupal-contri-d10/modules/custom/corporate_lite-3368906/js/magnific-popup/jquery.magnific-popup.min.js
    --------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------------------
     1 | WARNING | File appears to be minified and cannot be processed
    --------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /var/www/html/drupal-contri-d10/modules/custom/corporate_lite-3368906/js/magnific-popup/jquery.magnific-popup.js
    ----------------------------------------------------------------------------------------------------------------------
    FOUND 12 ERRORS AFFECTING 12 LINES
    ----------------------------------------------------------------------------------------------------------------------
       44 | ERROR | [x] Expected 1 space before opening brace; found 0
     1106 | ERROR | [ ] String concat is not required here; use a single string instead
     1107 | ERROR | [ ] String concat is not required here; use a single string instead
     1108 | ERROR | [ ] String concat is not required here; use a single string instead
     1109 | ERROR | [ ] String concat is not required here; use a single string instead
     1110 | ERROR | [ ] String concat is not required here; use a single string instead
     1113 | ERROR | [ ] String concat is not required here; use a single string instead
     1114 | ERROR | [ ] String concat is not required here; use a single string instead
     1115 | ERROR | [ ] String concat is not required here; use a single string instead
     1116 | ERROR | [ ] String concat is not required here; use a single string instead
     1544 | ERROR | [ ] String concat is not required here; use a single string instead
     1799 | ERROR | [x] Opening brace must be the last content on the line
    ----------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /var/www/html/drupal-contri-d10/modules/custom/corporate_lite-3368906/js/flexslider/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: /var/www/html/drupal-contri-d10/modules/custom/corporate_lite-3368906/js/flexslider/jquery.flexslider.js
    --------------------------------------------------------------------------------------------------------------
    FOUND 11 ERRORS AFFECTING 11 LINES
    --------------------------------------------------------------------------------------------------------------
       86 | ERROR | [x] Opening brace must be the last content on the line
      493 | ERROR | [x] Expected 1 space before opening brace; found 0
      885 | ERROR | [ ] Blank lines are not allowed after DEFAULT statements
     1115 | ERROR | [x] Inline control structures are not allowed
     1136 | ERROR | [x] Inline control structures are not allowed
     1164 | ERROR | [x] Expected 1 space before opening brace; found 0
     1165 | ERROR | [x] Expected 1 space before opening brace; found 0
     1166 | ERROR | [x] Expected 1 space before opening brace; found 0
     1167 | ERROR | [x] Expected 1 space before opening brace; found 0
     1168 | ERROR | [x] Expected 1 space before opening brace; found 0
     1169 | ERROR | [x] Expected 1 space before opening brace; found 0
    --------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------------------------------------
    
    
    FILE: /var/www/html/drupal-contri-d10/modules/custom/corporate_lite-3368906/js/owl-carousel/owl.carousel.min.js
    ---------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------
     1 | WARNING | File appears to be minified and cannot be processed
    ---------------------------------------------------------------------------------------------------------------
    
    
    FILE: /var/www/html/drupal-contri-d10/modules/custom/corporate_lite-3368906/js/owl-carousel/owl.carousel.js
    -----------------------------------------------------------------------------------------------------------
    FOUND 9 ERRORS AFFECTING 9 LINES
    -----------------------------------------------------------------------------------------------------------
      576 | ERROR | [x] Opening brace must be the last content on the line
      690 | ERROR | [x] Opening brace must be the last content on the line
      822 | ERROR | [x] Opening brace must be the last content on the line
      963 | ERROR | [x] Opening brace must be the last content on the line
     1107 | ERROR | [x] Opening brace must be the last content on the line
     1110 | ERROR | [x] Opening brace must be the last content on the line
     1113 | ERROR | [x] Opening brace must be the last content on the line
     1502 | ERROR | [x] Opening brace must be the last content on the line
     1866 | ERROR | [x] Opening brace must be the last content on the line
    -----------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------------
    
    Time: 2.82 secs; Memory: 52MB
    
Production build 0.71.5 2024