Coding style violations

Created on 8 August 2022, almost 2 years ago
Updated 6 September 2023, 10 months ago

Problem/Motivation

The following code style standards exist the current codebase:


FILE: ./web/modules/contrib/alinks/alinks.module
------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------
 8 | ERROR | [x] When importing a class with "use", do not include a leading \
 9 | ERROR | [x] When importing a class with "use", do not include a leading \
------------------------------------------------------------------------------------------------------


FILE: ./web/modules/contrib/alinks/tests/src/Kernel/AlinkPostRendererTest.php
-----------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
-----------------------------------------------------------------------------------------------------------------------------------
 11 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
 14 | ERROR   | Missing short description in doc comment
 19 | ERROR   | Missing short description in doc comment
 43 | ERROR   | Doc comment is empty
-----------------------------------------------------------------------------------------------------------------------------------


FILE: ./web/modules/contrib/alinks/src/Form/KeywordSettingsForm.php
-------------------------------------------------------------------------------------------------------------------------
FOUND 32 ERRORS AND 2 WARNINGS AFFECTING 32 LINES
-------------------------------------------------------------------------------------------------------------------------
  20 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
  23 | ERROR   | [ ] Missing member variable doc comment
  25 | ERROR   | [ ] Missing member variable doc comment
  63 | ERROR   | [ ] Missing short description in doc comment
  64 | ERROR   | [ ] Missing parameter comment
  65 | ERROR   | [ ] Missing parameter comment
 104 | ERROR   | [x] Short array syntax must be used to define arrays
 118 | ERROR   | [x] Short array syntax must be used to define arrays
 143 | ERROR   | [ ] Missing parameter comment
 144 | ERROR   | [ ] Missing parameter comment
 146 | ERROR   | [ ] Description for the @return value is missing
 152 | ERROR   | [ ] Missing short description in doc comment
 153 | ERROR   | [ ] Missing parameter comment
 153 | ERROR   | [ ] Doc comment for parameter $form does not match actual variable name $form_state
 154 | ERROR   | [ ] Missing parameter comment
 175 | ERROR   | [x] Short array syntax must be used to define arrays
 181 | ERROR   | [x] Short array syntax must be used to define arrays
 189 | ERROR   | [x] Short array syntax must be used to define arrays
 197 | ERROR   | [x] Short array syntax must be used to define arrays
 228 | ERROR   | [x] Short array syntax must be used to define arrays
 239 | ERROR   | [ ] Missing short description in doc comment
 240 | ERROR   | [ ] Missing parameter comment
 240 | ERROR   | [ ] Doc comment for parameter $form does not match actual variable name $form_state
 241 | ERROR   | [ ] Missing parameter comment
 242 | ERROR   | [ ] Description for the @return value is missing
 248 | ERROR   | [x] Short array syntax must be used to define arrays
 250 | ERROR   | [x] Short array syntax must be used to define arrays
 264 | ERROR   | [x] Short array syntax must be used to define arrays
 268 | ERROR   | [x] Short array syntax must be used to define arrays
 272 | ERROR   | [x] Short array syntax must be used to define arrays
 276 | ERROR   | [x] Short array syntax must be used to define arrays
 278 | ERROR   | [x] Short array syntax must be used to define arrays
 279 | ERROR   | [x] Short array syntax must be used to define arrays
 281 | WARNING | [x] A comma should follow the last multiline array item. Found: )
-------------------------------------------------------------------------------------------------------------------------


FILE: ./web/modules/contrib/alinks/src/Entity/Keyword.php
---------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 7 LINES
---------------------------------------------------------------------------------------------------------------
  68 | ERROR | [x] Short array syntax must be used to define arrays
 161 | ERROR | [x] Short array syntax must be used to define arrays
 173 | ERROR | [x] Short array syntax must be used to define arrays
 178 | ERROR | [x] Short array syntax must be used to define arrays
 183 | ERROR | [x] Short array syntax must be used to define arrays
 207 | ERROR | [x] Short array syntax must be used to define arrays
 211 | ERROR | [x] Short array syntax must be used to define arrays
---------------------------------------------------------------------------------------------------------------


FILE: ./web/modules/contrib/alinks/src/Entity/KeywordViewsData.php
------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------
 25 | ERROR | [x] Short array syntax must be used to define arrays
 26 | ERROR | [x] Short array syntax must be used to define arrays
------------------------------------------------------------------------------------------------------------------------


FILE: ./web/modules/contrib/alinks/src/KeywordListBuilder.php
-------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------
 29 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
-------------------------------------------------------------------------------------------------------------------


FILE: ./web/modules/contrib/alinks/src/AlinkPostRenderer.php
-------------------------------------------------------------------------------------------------------------------------------------------
FOUND 17 ERRORS AND 6 WARNINGS AFFECTING 21 LINES
-------------------------------------------------------------------------------------------------------------------------------------------
  13 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
  16 | ERROR   | [ ] Missing member variable doc comment
  18 | ERROR   | [ ] Missing member variable doc comment
  20 | ERROR   | [ ] Missing member variable doc comment
  29 | ERROR   | [ ] Missing member variable doc comment
  31 | ERROR   | [ ] Missing member variable doc comment
  37 | ERROR   | [x] Parameter comment indentation must be 3 spaces, found 4 spaces
  39 | ERROR   | [x] Parameter comment indentation must be 3 spaces, found 4 spaces
  41 | ERROR   | [x] Parameter comment indentation must be 3 spaces, found 4 spaces
  43 | ERROR   | [ ] Type hint "\Drupal\Core\Render\Markup" missing for $content
  43 | ERROR   | [ ] Type hint "array" missing for $context
  43 | ERROR   | [ ] Type hint "null" missing for $xpathSelector
 104 | ERROR   | [x] Parameter comment indentation must be 3 spaces, found 4 spaces
 133 | WARNING | [x] '@TODO: Make it configurable replaceAll vs. replaceFirst' should match the format '@todo Fix problem X here.'
 160 | WARNING | [x] '@TODO: Make it configurable replaceAll vs. replaceFirst' should match the format '@todo Fix problem X here.'
 172 | ERROR   | [ ] Doc comment is empty
 178 | WARNING | [x] '@todo: Try stemmer' should match the format '@todo Fix problem X here.'
 191 | WARNING | [x] '@TODO: Look at Search API Tokenizer & Highlighter' should match the format '@todo Fix problem X here.'
 213 | ERROR   | [ ] Doc comment is empty
 230 | ERROR   | [x] Return comment indentation must be 3 spaces, found 4 spaces
 256 | ERROR   | [x] Return comment indentation must be 3 spaces, found 4 spaces
 260 | WARNING | [x] '@TODO: Remove keywords with links which are already in the text' should match the format '@todo Fix problem X here.'
 274 | ERROR   | [x] Expected 1 blank line after function; 2 found
----------------------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇬🇷Greece dspachos

Live updates comments and jobs are added and updated live.
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.69.0 2024