Fix the issues reported by phpcs

Created on 10 July 2020, about 4 years ago
Updated 3 March 2023, over 1 year ago

Hi,

First, thanks for making this module available on d.o .

It would be great to fix all the PHPCS issues:

phpcs --standard=Drupal,DrupalPractice /xtcguzzle

FILE: XtendedGuzzleStorage.php
-----------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
 2 | ERROR | [x] There must be one blank line after the namespace declaration
 7 | ERROR | [x] Missing class doc comment
-----------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------


FILE: XtendedGuzzleTypeListBuilder.php
------------------------------------------------------------------------------------------------------------------------
FOUND 8 ERRORS AFFECTING 7 LINES
------------------------------------------------------------------------------------------------------------------------
  1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
  4 | ERROR | [x] There must be one blank line after the namespace declaration
 12 | ERROR | [x] Missing class doc comment
 32 | ERROR | [x] PHP keywords must be lowercase; expected "new" but found "New"
 43 | ERROR | [x] Missing function doc comment
 46 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
 48 | ERROR | [x] Expected 1 space after IF keyword; 0 found
 48 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------


FILE: XtendedGuzzle.php
---------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
 4 | ERROR | [x] There must be one blank line after the namespace declaration
---------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------


FILE: XtendedGuzzleType.php
-------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
-------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------


FILE: XtendedGuzzleController.php
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 5 WARNINGS AFFECTING 6 LINES
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  53 | ERROR   | The trigger_error message 'The entity.repository service must be passed to XtendedGuzzleController::__construct(), it is required before Drupal 9.0.0. See
     |         | https://www.drupal.org/node/2549139.' does not match the relaxed standard format: %thing% is deprecated in %deprecation-version% any free text %removal-version%.
     |         | %extra-info%. See %cr-link%
  54 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
  73 | WARNING | Line exceeds 80 characters; contains 81 characters
  76 | WARNING | Line exceeds 80 characters; contains 87 characters
  77 | WARNING | Line exceeds 80 characters; contains 81 characters
 100 | WARNING | Line exceeds 80 characters; contains 82 characters
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: Lorem.php
--------------------------------------------------------------------------------------------------------
FOUND 17 ERRORS AFFECTING 17 LINES
--------------------------------------------------------------------------------------------------------
  1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
  4 | ERROR | [x] There must be one blank line after the namespace declaration
 10 | ERROR | [x] Missing class doc comment
 12 | ERROR | [x] Missing function doc comment
 17 | ERROR | [x] Missing function doc comment
 22 | ERROR | [x] Missing function doc comment
 24 | ERROR | [x] Expected 1 blank line after function; 0 found
 25 | ERROR | [x] Missing function doc comment
 27 | ERROR | [x] Expected 1 blank line after function; 0 found
 28 | ERROR | [x] Missing function doc comment
 30 | ERROR | [x] Expected 1 blank line after function; 0 found
 31 | ERROR | [x] Missing function doc comment
 33 | ERROR | [x] Expected 1 blank line after function; 0 found
 34 | ERROR | [x] Missing function doc comment
 36 | ERROR | [x] Expected 1 blank line after function; 0 found
 37 | ERROR | [x] Missing function doc comment
 41 | ERROR | [x] Missing function doc comment
--------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 17 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------


FILE: LoremImage.php
------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 14 ERRORS AND 3 WARNINGS AFFECTING 14 LINES
------------------------------------------------------------------------------------------------------------------------------------------------------
  1 | ERROR   | [x] The PHP open tag must be followed by exactly one blank line
  4 | ERROR   | [x] There must be one blank line after the namespace declaration
  7 | WARNING | [x] Unused use statement
  9 | ERROR   | [x] Missing class doc comment
 11 | ERROR   | [ ] Missing short description in doc comment
 12 | ERROR   | [ ] Missing parameter comment
 13 | ERROR   | [ ] Missing parameter comment
 14 | ERROR   | [ ] Missing parameter comment
 15 | ERROR   | [ ] Missing parameter comment
 16 | ERROR   | [ ] Missing parameter comment
 17 | ERROR   | [ ] Missing parameter comment
 19 | ERROR   | [ ] Description for the @return value is missing
 29 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 0
 29 | ERROR   | [x] 4 spaces found before inline comment; expected "// $text = 'Ceci est mon texte';" but found "//    $text = 'Ceci est mon texte';"
 30 | WARNING | [x] There must be no blank line following an inline comment
 30 | WARNING | [ ] There must be no blank line following an inline comment
 30 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 0
------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: GuzzleBase.php
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 31 ERRORS AND 3 WARNINGS AFFECTING 30 LINES
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   3 | ERROR   | [x] There must be one blank line after the namespace declaration
   8 | WARNING | [x] Unused use statement
  12 | WARNING | [x] Unused use statement
  17 | ERROR   | [x] Additional blank lines found at end of doc comment
  20 | ERROR   | [ ] Missing short description in doc comment
  25 | ERROR   | [ ] Missing short description in doc comment
  26 | ERROR   | [x] Data types in @var tags need to be fully namespaced
  30 | ERROR   | [ ] Missing short description in doc comment
  31 | ERROR   | [x] Data types in @var tags need to be fully namespaced
  35 | ERROR   | [x] Missing function doc comment
  39 | ERROR   | [ ] Missing short description in doc comment
  40 | ERROR   | [ ] Missing parameter comment
  42 | ERROR   | [ ] Description for the @return value is missing
  44 | ERROR   | [ ] Type hint "array" missing for $options
  52 | ERROR   | [ ] Missing short description in doc comment
  53 | ERROR   | [ ] Description for the @return value is missing
  59 | ERROR   | [x] Missing function doc comment
  60 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters
  60 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 0
  60 | ERROR   | [x] 4 spaces found before inline comment; expected "// $settings = Settings::get('xtc.serve_client')['xtc']['serve_client']['server'];" but found "//    $settings
     |         |     = Settings::get('xtc.serve_client')['xtc']['serve_client']['server'];"
 100 | ERROR   | [x] Missing function doc comment
 106 | ERROR   | [x] Case breaking statements must be followed by a single blank line
 112 | ERROR   | [ ] Missing short description in doc comment
 113 | ERROR   | [ ] Description for the @return value is missing
 113 | ERROR   | [x] Data types in @return tags need to be fully namespaced
 119 | ERROR   | [x] Missing function doc comment
 123 | ERROR   | [x] Missing function doc comment
 127 | ERROR   | [x] Missing function doc comment
 130 | ERROR   | [x] Missing function doc comment
 131 | ERROR   | [x] PHP keywords must be lowercase; expected "new" but found "New"
 135 | ERROR   | [x] Missing function doc comment
 141 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
 141 | ERROR   | [x] Expected 1 space after closing parenthesis; found 0
 152 | ERROR   | [x] Expected newline after closing brace
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 22 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: GuzzleGet.php
---------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 4 LINES
---------------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
 2 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
 6 | ERROR | [x] 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
 9 | ERROR | [x] There must be one blank line after the namespace declaration
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------

Time: 233ms; Memory: 6MB
📌 Task
Status

RTBC

Version

1.0

Component

Code

Created by

🇦🇺Australia GuillaumeG

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.

Production build 0.71.5 2024