Fix the issues reported by phpcs

Created on 2 May 2023, over 1 year ago
Updated 31 May 2023, over 1 year ago

Problem/Motivation

vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig web/modules/contrib/augmentor/

FILE: /var/www/html/vbd7/web/modules/contrib/augmentor/src/Plugin/Action/AugmentorActionMinimal.php
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 4 WARNINGS AFFECTING 6 LINES
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
85 | WARNING | [ ] Line exceeds 80 characters; contains 97 characters
85 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 0
85 | ERROR | [x] 10 spaces found before inline comment; expected "// Note: We couldn't save the entity because when its already in the same presave event." but found "// Note: We couldn't
| | save the entity because when its already in the same presave event."
86 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 0
122 | WARNING | [ ] Only string literals should be passed to t() where possible
141 | WARNING | [ ] Only string literals should be passed to t() where possible
149 | WARNING | [ ] Only string literals should be passed to t() where possible
181 | ERROR | [x] Expected 1 blank line after function; 0 found
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/vbd7/web/modules/contrib/augmentor/src/Plugin/Action/AugmentorAction.php
--------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------
22 | ERROR | [x] There must be exactly one newline after the class comment
--------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------

FILE: /var/www/html/vbd7/web/modules/contrib/augmentor/src/Plugin/Field/FieldWidget/AugmentorBaseWidget.php
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
97 | ERROR | [x] Whitespace found at end of line
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------

FILE: /var/www/html/vbd7/web/modules/contrib/augmentor/src/Plugin/CKEditorPlugin/AugmentorCKEditor.php
------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------
127 | ERROR | [x] Use null coalesce operator instead of ternary operator.
------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------

Time: 2.83 secs; Memory: 14MB

Steps to reproduce

Proposed resolution

RUN:

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

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India dineshkumarbollu

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

Production build 0.71.5 2024