Coding Standard issues

Created on 6 September 2017, over 7 years ago
Updated 21 August 2024, 4 months ago

There are some coding standard issues in this module.

šŸ“Œ Task
Status

Needs work

Version

1.0

Component

Code

Created by

šŸ‡®šŸ‡³India jayesh_makwana

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

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Status changed to Needs work 4 months ago
  • šŸ‡µšŸ‡­Philippines cleavinjosh

    Hi @jayesh_makwana,

    I applied patch #2, it was applied smoothly and fixed most of the phpcs issues.

    These are the remaining issues after I ran phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml.

    āžœ  bookpath git:(7.x-1.x) curl https://www.drupal.org/files/issues/bookpath_coding_standard-2907070-2.patch | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 14092  100 14092    0     0  34522      0 --:--:-- --:--:-- --:--:-- 34624
    patching file bookpath.install
    patching file bookpath.module
    patching file views/bookpath.views.inc
    patching file views/bookpath_handler_bookpath.inc
    āžœ  bookpath git:(7.x-1.x) āœ— ..
    āžœ  contrib phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,css,js bookpath
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/bookpath/bookpath.module
    ---------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    ---------------------------------------------------------------------------------------------
      90 | WARNING | Unused variable $menu_key.
     162 | WARNING | Unused variable $result.
    ---------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/bookpath/views/bookpath_handler_bookpath.inc
    -----------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AND 1 WARNING AFFECTING 2 LINES
    -----------------------------------------------------------------------------------------------------------------
     16 | ERROR   | Class name must begin with a capital letter
     16 | ERROR   | Class name must use UpperCamel naming without underscores
     21 | WARNING | Possible useless method overriding detected
    -----------------------------------------------------------------------------------------------------------------
    
    Time: 214ms; Memory: 10MB
    
    āžœ  contrib

    Thank you.

Production build 0.71.5 2024