Coding Standard phpcs

Created on 30 June 2023, over 1 year ago
Updated 20 August 2024, 3 months ago
FILE: /var/www/html/drupal8/web/modules/beanstalkd/beanstalkd.module
-----------------------------------------------------------------------------
FOUND 5 ERRORS AND 2 WARNINGS AFFECTING 7 LINES
-----------------------------------------------------------------------------
   5 | ERROR   | [x] Doc comment short description must end with a full stop
  23 | ERROR   | [x] Expected 1 blank line after function; 2 found
 155 | ERROR   | [x] Parameter comment must end with a full stop
 158 | WARNING | [ ] Line exceeds 80 characters; contains 87 characters
 159 | WARNING | [ ] Line exceeds 80 characters; contains 89 characters
 188 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
 191 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------


FILE: /var/www/html/drupal8/web/modules/beanstalkd/beanstalkd.admin.inc
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------
 26 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
 28 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks,
    |         |     question marks, colons, or closing parentheses
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: /var/www/html/drupal8/web/modules/beanstalkd/beanstalkd.test
--------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 5 LINES
--------------------------------------------------------------------------------
   6 | ERROR | [ ] 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
  16 | ERROR | [x] Expected 1 blank line before function; 0 found
  34 | ERROR | [x] Visibility must be declared on method "testQueue"
 113 | ERROR | [x] Expected 1 blank line after function; 0 found
 114 | 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: /var/www/html/drupal8/web/modules/beanstalkd/README.txt
----------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------
  33 | WARNING | Line exceeds 80 characters; contains 83 characters
  45 | WARNING | Line exceeds 80 characters; contains 92 characters
 191 | WARNING | Line exceeds 80 characters; contains 92 characters
----------------------------------------------------------------------


FILE: /var/www/html/drupal8/web/modules/beanstalkd/beanstalkd.queue.inc
--------------------------------------------------------------------------------
FOUND 12 ERRORS AND 5 WARNINGS AFFECTING 17 LINES
--------------------------------------------------------------------------------
   8 | ERROR   | [x] Missing class doc comment
   9 | ERROR   | [ ] Missing member variable doc comment
  12 | ERROR   | [ ] Missing @var tag in member variable comment
  13 | ERROR   | [ ] Class property $beanstalkd_queue should use lowerCamel
     |         |     naming without underscores
  15 | ERROR   | [ ] Parameter $force_connection is not described in comment
  29 | WARNING | [ ] Line exceeds 80 characters; contains 88 characters
  38 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
  61 | ERROR   | [ ] The array declaration extends to column 84 (the limit is
     |         |     80). The array content should be split up over multiple
     |         |     lines
  69 | WARNING | [ ] Line exceeds 80 characters; contains 90 characters
  78 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
 133 | ERROR   | [ ] unserialize() is insecure unless allowed classes are
     |         |     limited. Use a safe format like JSON or use the
     |         |     allowed_classes option.
 143 | WARNING | [ ] Exceptions should not be translated
 183 | ERROR   | [ ] Function return type is not void, but function is
     |         |     returning void here
 207 | ERROR   | [x] Expected "object|false" but found "object|FALSE" for
     |         |     function return type
 304 | ERROR   | [ ] Private method name "BeanstalkdQueue::_tubeName" is not in
     |         |     lowerCamel format
 306 | ERROR   | [x] Expected 1 blank line after function; 0 found
 307 | ERROR   | [x] The closing brace for the class must have an empty line
     |         |     before it
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

šŸ“Œ Task
Status

Needs work

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Neeraj333
  • Status changed to Needs review over 1 year ago
  • Status changed to Needs work 3 months ago
  • šŸ‡µšŸ‡­Philippines cleavinjosh

    Hi @Neeraj333,

    I applied patch #2, however, I encountered an error.

    āžœ  beanstalkd git:(8.x-1.x) āœ— curl https://www.drupal.org/files/issues/2023-06-30/fix_coding_standard-3371548-2.patch | git apply -v
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 12892  100 12892    0     0  90614      0 --:--:-- --:--:-- --:--:-- 90788
    Checking patch README.txt...
    error: README.txt: No such file or directory
    Checking patch beanstalkd.admin.inc...
    error: beanstalkd.admin.inc: No such file or directory
    Checking patch beanstalkd.module...
    error: while searching for:
    
    /**
     * @file
     * Provide core implementation of beanstalkd support for Queues
     */
    
    /**
    
    error: patch failed: beanstalkd.module:2
    error: beanstalkd.module: patch does not apply
    Checking patch beanstalkd.queue.inc...
    error: beanstalkd.queue.inc: No such file or directory
    Checking patch beanstalkd.test...
    error: beanstalkd.test: No such file or directory
    āžœ  beanstalkd git:(8.x-1.x) āœ—

    Thank you.

Production build 0.71.5 2024