Fix phpcs issues

Created on 15 July 2024, 4 months ago

Problem/Motivation

Need to fix below phpcs issues

modules/custom/google_places/

FILE: /web/modules/custom/google_places/src/Plugin/Field/FieldType/GooglePlacesMultifieldItem.php
------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------------------------------------------
 36 | ERROR | [x] Expected 1 blank line after function; 0 found
 37 | ERROR | [x] The closing brace for the class must have an empty line before it
------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /web/modules/custom/google_places/src/Plugin/Field/FieldWidget/GooglePlacesMultifieldWidget.php
----------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------------------------
 56 | WARNING | #description values usually have to run through t() for translation
----------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /web/modules/custom/google_places/src/Plugin/AiAutomatorType/AddressToGooglePlacesMulti.php
------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
------------------------------------------------------------------------------------------------------------------------------------------------------------
   9 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\ContentEntityInterface.
  36 | ERROR   | [ ] Missing @var tag in member variable comment
 136 | ERROR   | [ ] Parameter $googlePlacesApi is not described in comment
 223 | WARNING | [ ] Only string literals should be passed to t() where possible
------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /web/modules/custom/google_places/src/Plugin/AiAutomatorType/SearchToAddress.php
-------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------------------
 9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\ContentEntityInterface.
-------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /web/modules/custom/google_places/src/Plugin/AiAutomatorType/AddressFieldFromText.php
------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 5 LINES
------------------------------------------------------------------------------------------------------------------------------------------------------
 11 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\ContentEntityInterface.
 48 | ERROR | [ ] Parameter tags must be grouped together in a doc comment
 50 | ERROR | [ ] Parameter tags must be grouped together in a doc comment
 52 | ERROR | [ ] Parameter tags must be grouped together in a doc comment
 52 | ERROR | [ ] Doc comment for parameter $openAiRequester does not match actual variable name $googlePlacesApi
 54 | ERROR | [ ] Parameter tags must be grouped together in a doc comment
------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /web/modules/custom/google_places/src/GooglePlacesApi.php
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------------------------------------------
   6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Config\ConfigFactoryInterface.
 201 | ERROR | [x] Expected 1 blank line after function; 0 found
 202 | ERROR | [x] The closing brace for the class must have an empty line before it
-------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------


FILE: /web/modules/custom/google_places/readme.md
------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 12 WARNINGS AFFECTING 12 LINES
------------------------------------------------------------------------------------------------------------
 10 | WARNING | Line exceeds 80 characters; contains 234 characters
 12 | WARNING | Line exceeds 80 characters; contains 87 characters
 14 | WARNING | Line exceeds 80 characters; contains 116 characters
 17 | WARNING | Line exceeds 80 characters; contains 89 characters
 18 | WARNING | Line exceeds 80 characters; contains 115 characters
 19 | WARNING | Line exceeds 80 characters; contains 107 characters
 20 | WARNING | Line exceeds 80 characters; contains 161 characters
 24 | WARNING | Line exceeds 80 characters; contains 100 characters
 30 | WARNING | Line exceeds 80 characters; contains 100 characters
 34 | WARNING | Line exceeds 80 characters; contains 82 characters
 43 | WARNING | Line exceeds 80 characters; contains 86 characters
 65 | WARNING | Line exceeds 80 characters; contains 92 characters
------------------------------------------------------------------------------------------------------------

Time: 224ms; Memory: 12MB
📌 Task
Status

RTBC

Version

1.0

Component

Code

Created by

🇮🇳India dev2.addweb

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