Fix the issues reported by phpcs

Created on 10 July 2024, 5 months ago

Problem/Motivation

command -:
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig web/modules/contrib/deepgram/

FILE: /var/www/html/d10/web/modules/contrib/deepgram/src/Plugin/AiProvider/DeepgramProvider.php
-----------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------
 168 | ERROR | [x] Expected newline after closing brace
 231 | ERROR | [x] Expected 1 blank line after function; 2 found
-----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------


FILE: /var/www/html/d10/web/modules/contrib/deepgram/src/Deepgram.php
-----------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------------------------------------------------------
   6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Config\ConfigFactory.
  31 | ERROR | [ ] Parameter $keyRepository is not described in comment
 144 | ERROR | [x] No space found before comment text; expected "// $options['http_errors'] = FALSE;" but found "//$options['http_errors'] = FALSE;"
-----------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/d10/web/modules/contrib/deepgram/readme.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
----------------------------------------------------------------------
  9 | WARNING | Line exceeds 80 characters; contains 130 characters
 11 | WARNING | Line exceeds 80 characters; contains 116 characters
 15 | WARNING | Line exceeds 80 characters; contains 94 characters
 25 | WARNING | Line exceeds 80 characters; contains 100 characters
 33 | WARNING | Line exceeds 80 characters; contains 92 characters
----------------------------------------------------------------------

Time: 253ms; Memory: 12MB

Steps to reproduce

Run PHPCS on Config Pages module.

Proposed resolution

Fixed the coding standards.

Remaining tasks

Submit the patch either MR.

📌 Task
Status

RTBC

Version

1.0

Component

Code

Created by

🇮🇳India hetal.solanki

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

Production build 0.71.5 2024