Created on 9 June 2023, over 1 year ago

As reported by shashank5563 there are some code standards fixes that need to be made.

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

FILE: /modules/doc_serialization/doc_serialization.install
--------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 5 LINES
--------------------------------------------------------------------------------------------
  1 | ERROR | [x] Missing file doc comment
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  9 | ERROR | [x] Short array syntax must be used to define arrays
 13 | ERROR | [x] Expected 1 blank line after function; 0 found
 20 | ERROR | [x] Short array syntax must be used to define arrays
 22 | ERROR | [x] Expected 1 space before "!=="; 0 found
--------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------


FILE: /modules/doc_serialization/tests/src/Unit/EventSubscriber/SubscriberTest.php
--------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 24 | ERROR | [x] Expected 1 blank line before function; 0 found
--------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------


FILE: /modules/doc_serialization/README.md
----------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------------
  8 | WARNING | Line exceeds 80 characters; contains 288 characters
  9 | WARNING | Line exceeds 80 characters; contains 83 characters
 15 | WARNING | Line exceeds 80 characters; contains 104 characters
 43 | WARNING | Line exceeds 80 characters; contains 94 characters
----------------------------------------------------------------------------


FILE: /modules/doc_serialization/src/Encoder/Docx.php
-----------------------------------------------------------------------------------------------------
FOUND 28 ERRORS AND 11 WARNINGS AFFECTING 39 LINES
-----------------------------------------------------------------------------------------------------
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
   5 | WARNING | [x] Unused use statement
   6 | WARNING | [x] Unused use statement
   7 | WARNING | [x] Unused use statement
   8 | WARNING | [x] Unused use statement
   9 | WARNING | [x] Unused use statement
  10 | WARNING | [x] Unused use statement
  13 | WARNING | [x] Unused use statement
  17 | ERROR   | [x] Expected 1 space(s) before asterisk; 0 found
  18 | ERROR   | [x] Expected 1 space(s) before asterisk; 0 found
  22 | ERROR   | [x] Expected 3 space(s) before asterisk; 2 found
  23 | ERROR   | [x] Expected 3 space(s) before asterisk; 2 found
  24 | ERROR   | [x] Expected 3 space(s) before asterisk; 2 found
  25 | ERROR   | [x] Expected 3 space(s) before asterisk; 2 found
  29 | ERROR   | [x] Expected 3 space(s) before asterisk; 2 found
  30 | ERROR   | [x] Expected 3 space(s) before asterisk; 2 found
  31 | ERROR   | [x] Expected 3 space(s) before asterisk; 2 found
  32 | ERROR   | [x] Expected 3 space(s) before asterisk; 2 found
  36 | ERROR   | [x] Expected 3 space(s) before asterisk; 2 found
  37 | ERROR   | [x] Expected 3 space(s) before asterisk; 2 found
  38 | ERROR   | [x] Expected 3 space(s) before asterisk; 2 found
  39 | ERROR   | [x] Expected 3 space(s) before asterisk; 2 found
  40 | ERROR   | [x] Expected 3 space(s) before asterisk; 2 found
  46 | ERROR   | [x] Expected 3 space(s) before asterisk; 2 found
  47 | ERROR   | [x] Expected 3 space(s) before asterisk; 2 found
  48 | ERROR   | [x] Expected 3 space(s) before asterisk; 2 found
  49 | ERROR   | [x] Expected 3 space(s) before asterisk; 2 found
  53 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 6
  54 | ERROR   | [x] Case breaking statement indented incorrectly; expected 8 spaces, found 6
  57 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 6
  58 | ERROR   | [x] Case breaking statement indented incorrectly; expected 8 spaces, found 6
  61 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 6
  62 | ERROR   | [x] Case breaking statement indented incorrectly; expected 8 spaces, found 6
  75 | WARNING | [ ] File::load calls should be avoided in classes, use dependency injection instead
  76 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
  86 | WARNING | [ ] Unused variable $key.
 103 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
 109 | ERROR   | [x] Expected 3 space(s) before asterisk; 2 found
 110 | ERROR   | [x] Expected 3 space(s) before asterisk; 2 found
-----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 35 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------


FILE: /modules/doc_serialization/src/Encoder/Doc.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 59 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 60 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------


FILE: /modules/doc_serialization/src/Plugin/views/display/WordExport.php
----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------


FILE: /modules/doc_serialization/src/Plugin/views/display_extender/DocSerialization.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 61 ERRORS AND 5 WARNINGS AFFECTING 53 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
   1 | ERROR   | [x] The PHP open tag must be followed by exactly one blank line
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
   2 | ERROR   | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
  10 | ERROR   | [x] There must be one blank line after the last USE statement; 0 found;
  27 | ERROR   | [x] Expected 1 blank line before function; 0 found
  28 | ERROR   | [x] Expected 1 space after "="; 2 found
  28 | ERROR   | [x] Short array syntax must be used to define arrays
  29 | ERROR   | [x] Short array syntax must be used to define arrays
  30 | ERROR   | [x] Short array syntax must be used to define arrays
  31 | ERROR   | [x] Short array syntax must be used to define arrays
  32 | WARNING | [x] A comma should follow the last multiline array item. Found: )
  34 | ERROR   | [x] Expected 1 blank line after function; 0 found
  39 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 3
  39 | ERROR   | [x] Perl-style comments are not allowed; use "// Comment" instead
  40 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 3
  40 | ERROR   | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
  41 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 3
  42 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 4
  42 | ERROR   | [x] Short array syntax must be used to define arrays
  43 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  46 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 4
  47 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 4
  47 | WARNING | [ ] Only string literals should be passed to t() where possible
  48 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 4
  49 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 6
  50 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 6
  51 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 4
  52 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 4
  53 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 6
  54 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 4
  55 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 4
  55 | ERROR   | [x] Short array syntax must be used to define arrays
  57 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  58 | ERROR   | [x] Expected 1 space after "=>"; 2 found
  60 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 3
  61 | ERROR   | [x] Expected 1 blank line after function; 0 found
  67 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  83 | ERROR   | [x] Short array syntax must be used to define arrays
  96 | ERROR   | [x] Expected 1 blank line after function; 0 found
 101 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 6
 102 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 6
 103 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 8
 104 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 10
 105 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 8
 106 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 8
 107 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 10
 108 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 12
 109 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 10
 110 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 8
 111 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 6
 112 | ERROR   | [x] Expected 1 blank line after function; 0 found
 127 | ERROR   | [x] Expected 1 blank line after function; 0 found
 131 | ERROR   | [x] There should be no white space after an opening "{"
 131 | ERROR   | [x] There should be no white space before a closing "}"
 131 | ERROR   | [x] Expected 1 blank line after function; 0 found
 135 | ERROR   | [x] There should be no white space after an opening "{"
 135 | ERROR   | [x] There should be no white space before a closing "}"
 135 | ERROR   | [x] Expected 1 blank line after function; 0 found
 138 | ERROR   | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
 140 | ERROR   | [x] There should be no white space after an opening "{"
 140 | ERROR   | [x] There should be no white space before a closing "}"
 140 | ERROR   | [x] Expected 1 blank line after function; 0 found
 147 | ERROR   | [x] Expected 1 blank line after function; 0 found
 155 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
 157 | ERROR   | [x] Expected 1 blank line after function; 0 found
 158 | ERROR   | [x] The closing brace for the class must have an empty line before it
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 61 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------


FILE: /modules/doc_serialization/src/Plugin/views/style/WordExport.php
--------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
--------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------


FILE: /modules/doc_serialization/src/EventSubscriber/Subscriber.php
-----------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
-----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------


FILE: /modules/doc_serialization/doc_serialization.info.yml
---------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES
---------------------------------------------------------------------------------------------------------------
 1 | WARNING | [ ] Remove "version" from the info file, it will be added by drupal.org packaging automatically
 7 | WARNING | [ ] All dependencies must be prefixed with the project name, for example "drupal:"
 8 | WARNING | [ ] All dependencies must be prefixed with the project name, for example "drupal:"
 9 | ERROR   | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
📌 Task
Status

Fixed

Version

4.0

Component

Code

Created by

🇳🇱Netherlands theemstra

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

Comments & Activities

Production build 0.71.5 2024