Fix the issues reported by phpcs

Created on 9 November 2023, about 1 year ago
Updated 12 June 2024, 7 months ago

FILE: /background_image/src/Form/BackgroundImageHandlerForm.php
--------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------
36 | WARNING | Possible useless method overriding detected
--------------------------------------------------------------------------------------------------------------------

FILE: /background_image/src/BackgroundImageFormTrait.php
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
300 | WARNING | Only string literals should be passed to t() where possible
-------------------------------------------------------------------------------------------------------------

๐Ÿ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia chetan 11

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

  • Issue created by @chetan 11
  • First commit to issue fork.
  • First commit to issue fork.
  • Status changed to Needs review about 1 year ago
  • Status changed to Needs work about 1 year ago
  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines clarkssquared

    Hi chetan

    I applied your MR !6 and I confirmed that it fixes some of the PHPCS issues but there are lots of PHPCS issues that is found in the module, hence I will move this to needs work.

    โžœ  background_image git:(2.0.x) curl https://git.drupalcode.org/project/background_image/-/merge_requests/6.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 42360    0 42360    0     0  91933      0 --:--:-- --:--:-- --:--:-- 93716
    patching file background_image.install
    patching file background_image.module
    patching file 'src/BackgroundImageFormTrait.php'
    patching file 'src/BackgroundImageListBuilder.php'
    patching file 'src/BackgroundImageManager.php'
    patching file 'src/BackgroundImageManagerInterface.php'
    patching file 'src/BackgroundImageSettings.php'
    patching file 'src/BackgroundImageViewBuilder.php'
    patching file 'src/Controller/BackgroundImageCssController.php'
    patching file 'src/Entity/BackgroundImage.php'
    patching file 'src/EventSubscriber/StageFileProxySubscriber.php'
    patching file 'src/Form/BackgroundImageForm.php'
    patching file 'src/Form/BackgroundImageHandlerForm.php'
    patching file 'src/Form/BackgroundImageSettingsForm.php'
    patching file 'src/PathProcessor/PathProcessorBackgroundImage.php'
    patching file 'src/Plugin/Block/BackgroundImageTextBlock.php'
    patching file 'tests/src/Functional/BackgroundImageTestBase.php'
    โžœ  background_image git:(2.0.x) โœ— ..
    โžœ  contrib git:(master) โœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml background_image 
    
    FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/background_image/background_image.module
    --------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------------------------------
     159 | ERROR | The array declaration extends to column 91 (the limit is 80). The array content should be split up over multiple lines
    --------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/background_image/README.md
    ---------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------
     7 | WARNING | Line exceeds 80 characters; contains 106 characters
    ---------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/background_image/src/Form/BackgroundImageForm.php
    -----------------------------------------------------------------------------------------------------------------------------------------
    FOUND 27 ERRORS AND 12 WARNINGS AFFECTING 39 LINES
    -----------------------------------------------------------------------------------------------------------------------------------------
      17 | ERROR   | Doc comment is empty
      30 | ERROR   | Missing short description in doc comment
      35 | ERROR   | Missing short description in doc comment
      40 | ERROR   | Missing short description in doc comment
      45 | ERROR   | Missing short description in doc comment
      50 | ERROR   | Missing short description in doc comment
      55 | ERROR   | Missing short description in doc comment
      60 | ERROR   | Missing short description in doc comment
      65 | ERROR   | Missing short description in doc comment
      70 | ERROR   | Missing short description in doc comment
      75 | ERROR   | Missing short description in doc comment
      80 | ERROR   | Missing short description in doc comment
      92 | ERROR   | Missing short description in doc comment
      93 | ERROR   | Missing parameter comment
      94 | ERROR   | Missing parameter comment
      95 | ERROR   | Missing parameter comment
      96 | ERROR   | Missing parameter comment
      98 | ERROR   | Description for the @return value is missing
     130 | WARNING | Line exceeds 80 characters; contains 81 characters
     371 | ERROR   | The array declaration extends to column 126 (the limit is 80). The array content should be split up over multiple lines
     533 | WARNING | #options values usually have to run through t() for translation
     534 | WARNING | #options values usually have to run through t() for translation
     535 | WARNING | #options values usually have to run through t() for translation
     536 | WARNING | #options values usually have to run through t() for translation
     579 | WARNING | Do not pass empty strings to t()
     607 | ERROR   | The array declaration extends to column 98 (the limit is 80). The array content should be split up over multiple lines
     613 | ERROR   | Description for the @return value is missing
     626 | ERROR   | Missing short description in doc comment
     627 | ERROR   | Description for the @return value is missing
     642 | ERROR   | Description for the @return value is missing
     658 | ERROR   | Description for the @return value is missing
     671 | ERROR   | Description for the @return value is missing
     710 | WARNING | Line exceeds 80 characters; contains 82 characters
     879 | ERROR   | The array declaration extends to column 151 (the limit is 80). The array content should be split up over multiple lines
     890 | WARNING | Line exceeds 80 characters; contains 82 characters
     945 | WARNING | Unused variable $target.
     948 | WARNING | Unused variable $target.
     951 | WARNING | Unused variable $target.
     954 | WARNING | Unused variable $target.
    -----------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/background_image/src/Form/BackgroundImageHandlerForm.php
    ---------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
    ---------------------------------------------------------------------------------------------------------------------------------
     33 | ERROR   | Doc comment is empty
     36 | WARNING | Possible useless method overriding detected
    ---------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/background_image/src/Form/BackgroundImageSettingsForm.php
    ----------------------------------------------------------------------------------------------------------------------------------------
    FOUND 5 ERRORS AND 2 WARNINGS AFFECTING 7 LINES
    ----------------------------------------------------------------------------------------------------------------------------------------
      17 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
      51 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
     106 | ERROR   | The array declaration extends to column 98 (the limit is 80). The array content should be split up over multiple lines
     116 | ERROR   | The array declaration extends to column 97 (the limit is 80). The array content should be split up over multiple lines
     121 | ERROR   | The array declaration extends to column 95 (the limit is 80). The array content should be split up over multiple lines
     151 | ERROR   | The array declaration extends to column 99 (the limit is 80). The array content should be split up over multiple lines
     159 | ERROR   | The array declaration extends to column 97 (the limit is 80). The array content should be split up over multiple lines
    ----------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/background_image/src/Cache/Context/BackgroundImageBaseCacheContext.php
    -----------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 3 LINES
    -----------------------------------------------------------------------------------------------------------------------------------------------
     14 | ERROR | Missing short description in doc comment
     19 | ERROR | Missing short description in doc comment
     27 | ERROR | Missing parameter comment
    -----------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/background_image/src/Entity/BackgroundImage.php
    --------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------------------------------
     618 | ERROR | The array declaration extends to column 98 (the limit is 80). The array content should be split up over multiple lines
    --------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/background_image/src/BackgroundImageInterface.php
    --------------------------------------------------------------------------------------------------------------------------
    FOUND 18 ERRORS AFFECTING 18 LINES
    --------------------------------------------------------------------------------------------------------------------------
     112 | ERROR | Missing short description in doc comment
     113 | ERROR | Description for the @return value is missing
     117 | ERROR | Missing short description in doc comment
     118 | ERROR | Description for the @return value is missing
     122 | ERROR | Missing short description in doc comment
     123 | ERROR | Description for the @return value is missing
     127 | ERROR | Missing short description in doc comment
     128 | ERROR | Description for the @return value is missing
     143 | ERROR | Description for the @return value is missing
     176 | ERROR | Description for the @return value is missing
     180 | ERROR | Missing short description in doc comment
     205 | ERROR | Description for the @return value is missing
     216 | ERROR | Description for the @return value is missing
     287 | ERROR | Missing short description in doc comment
     288 | ERROR | Description for the @return value is missing
     295 | ERROR | Description for the @return value is missing
     305 | ERROR | Description for the @return value is missing
     325 | ERROR | Description for the @return value is missing
    --------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/background_image/src/Plugin/Block/BackgroundImageBlock.php
    -----------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------------------
     9 | ERROR | Missing short description in doc comment
    -----------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/background_image/src/Plugin/Block/BackgroundImageTextBlock.php
    ---------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------------------------------
     9 | ERROR | Missing short description in doc comment
    ---------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/background_image/src/BackgroundImageManager.php
    ------------------------------------------------------------------------------------------------------------------------
    FOUND 18 ERRORS AND 5 WARNINGS AFFECTING 23 LINES
    ------------------------------------------------------------------------------------------------------------------------
      36 | ERROR   | Doc comment is empty
      45 | ERROR   | Missing short description in doc comment
      50 | ERROR   | Missing short description in doc comment
      62 | ERROR   | Missing short description in doc comment
      67 | ERROR   | Missing short description in doc comment
      72 | ERROR   | Missing short description in doc comment
      77 | ERROR   | Missing short description in doc comment
      82 | ERROR   | Missing short description in doc comment
      87 | ERROR   | Missing short description in doc comment
      92 | ERROR   | Missing short description in doc comment
      97 | ERROR   | Missing short description in doc comment
     102 | ERROR   | Missing short description in doc comment
     107 | ERROR   | Missing short description in doc comment
     112 | ERROR   | Missing short description in doc comment
     117 | ERROR   | Parameter $config_factory is not described in comment
     120 | ERROR   | Missing parameter name
     154 | ERROR   | Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
     313 | ERROR   | Parameter tags must be defined first in a doc comment
     329 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
     382 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
     457 | WARNING | Unused variable $bundle_entity_type.
     650 | WARNING | Line exceeds 80 characters; contains 84 characters
     750 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    ------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/background_image/src/BackgroundImageSettings.php
    -------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------------
     200 | WARNING | Unused variable $diff_value.
    -------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/background_image/src/Controller/BackgroundImageCssController.php
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 2 WARNINGS AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     342 | WARNING | The deprecation-version 'drupal:8.0-1.4' does not match the lower-case machine-name standard: drupal:n.n.n or project:n.x-n.n or project:n.x-n.n-label[n] or project:n.n.n or project:n.n.n-label[n]
     342 | WARNING | The removal-version 'drupal:8.0-2.0' does not match the lower-case machine-name standard: drupal:n.n.n or project:n.x-n.n or project:n.x-n.n-label[n] or project:n.n.n or project:n.n.n-label[n]
     342 | ERROR   | Each @deprecated tag must have a @see tag immediately following it
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/background_image/src/BackgroundImageListBuilder.php
    -------------------------------------------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 2 LINES
    -------------------------------------------------------------------------------------------------------------------------------------
     30 | ERROR | The array declaration extends to column 85 (the limit is 80). The array content should be split up over multiple lines
     33 | ERROR | The array declaration extends to column 90 (the limit is 80). The array content should be split up over multiple lines
     33 | ERROR | The array declaration extends to column 89 (the limit is 80). The array content should be split up over multiple lines
    -------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/background_image/src/BackgroundImageManagerInterface.php
    ---------------------------------------------------------------------------------------------------------------------------------
    FOUND 16 ERRORS AND 1 WARNING AFFECTING 17 LINES
    ---------------------------------------------------------------------------------------------------------------------------------
      16 | ERROR   | Doc comment is empty
      24 | ERROR   | Missing parameter type
      26 | ERROR   | Missing parameter type
      28 | WARNING | Line exceeds 80 characters; contains 81 characters
      36 | ERROR   | Missing parameter comment
      97 | ERROR   | Description for the @return value is missing
     104 | ERROR   | Description for the @return value is missing
     111 | ERROR   | Description for the @return value is missing
     191 | ERROR   | Description for the @return value is missing
     207 | ERROR   | Description for the @return value is missing
     252 | ERROR   | Description for the @return value is missing
     274 | ERROR   | Description for the @return value is missing
     281 | ERROR   | Description for the @return value is missing
     330 | ERROR   | Missing short description in doc comment
     331 | ERROR   | Description for the @return value is missing
     340 | ERROR   | Missing parameter type
     350 | ERROR   | Description for the @return value is missing
    ---------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/background_image/src/Routing/BackgroundImageRoutes.php
    -------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------------------
     11 | WARNING | Line exceeds 80 characters; contains 81 characters
    -------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/background_image/src/BackgroundImageAccessControlHandler.php
    -------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------------------------
     24 | ERROR | Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
    -------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/background_image/src/EventSubscriber/StageFileProxySubscriber.php
    ------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 3 LINES
    ------------------------------------------------------------------------------------------------------------------------------------------
      8 | ERROR | Doc comment is empty
     13 | ERROR | Missing short description in doc comment
     14 | ERROR | Missing parameter comment
    ------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/background_image/src/BackgroundImageFormTrait.php
    ----------------------------------------------------------------------------------------------------------------------------------------
    FOUND 27 ERRORS AND 2 WARNINGS AFFECTING 29 LINES
    ----------------------------------------------------------------------------------------------------------------------------------------
      18 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
      23 | ERROR   | Missing short description in doc comment
      28 | ERROR   | Missing short description in doc comment
      33 | ERROR   | Missing short description in doc comment
      38 | ERROR   | Missing short description in doc comment
      43 | ERROR   | Missing short description in doc comment
      48 | ERROR   | Missing short description in doc comment
      53 | ERROR   | Missing short description in doc comment
      58 | ERROR   | Missing short description in doc comment
      63 | ERROR   | Missing short description in doc comment
      68 | ERROR   | Missing short description in doc comment
     102 | ERROR   | The array declaration extends to column 83 (the limit is 80). The array content should be split up over multiple lines
     147 | ERROR   | Missing parameter type
     149 | ERROR   | Missing parameter type
     278 | WARNING | Only string literals should be passed to t() where possible
     335 | ERROR   | Description for the @return value is missing
     376 | ERROR   | Description for the @return value is missing
     405 | ERROR   | Missing short description in doc comment
     406 | ERROR   | Description for the @return value is missing
     415 | ERROR   | Description for the @return value is missing
     439 | ERROR   | Description for the @return value is missing
     457 | ERROR   | Description for the @return value is missing
     477 | ERROR   | Description for the @return value is missing
     538 | ERROR   | Missing parameter type
     540 | ERROR   | Missing parameter type
     603 | ERROR   | Description for the @return value is missing
     616 | ERROR   | Description for the @return value is missing
     632 | ERROR   | Description for the @return value is missing
     642 | ERROR   | Description for the @return value is missing
    ----------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/background_image/src/BackgroundImageViewBuilder.php
    ----------------------------------------------------------------------------------------------------------------------------
    FOUND 14 ERRORS AFFECTING 13 LINES
    ----------------------------------------------------------------------------------------------------------------------------
      75 | ERROR | [x] Expected 1 blank line before function; 2 found
      80 | ERROR | [x] Expected 1 space between type hint and argument "$entity_display_repository"; 0 found
     114 | ERROR | [ ] Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
     161 | ERROR | [x] The first index in a multi-value array must be on a new line
     163 | ERROR | [x] Closing parenthesis of array declaration must be on a new line
     169 | ERROR | [x] The first index in a multi-value array must be on a new line
     172 | ERROR | [x] Closing parenthesis of array declaration must be on a new line
     301 | ERROR | [ ] Description for the @return value is missing
     311 | ERROR | [x] Use "elseif" in place of "else if"
     315 | ERROR | [x] Use "elseif" in place of "else if"
     319 | ERROR | [x] Use "elseif" in place of "else if"
     319 | ERROR | [x] list(...) is forbidden, use [...] instead.
     324 | ERROR | [x] Use "elseif" in place of "else if"
     334 | ERROR | [ ] Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
    ----------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 11 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------------
    
    Time: 1.49 secs; Memory: 18MB
    
    โžœ  contrib git:(master) โœ— 
    
  • Assigned to zkhan.aamir
  • Issue was unassigned.
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia zkhan.aamir

    Fixed some of the issues

    Still there are remaining issues related to doc comment and DI

    FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\contrib\background_image\src\BackgroundImageFormTrait.php
    ------------------------------------------------------------------------------------------------------------------
    FOUND 26 ERRORS AND 2 WARNINGS AFFECTING 28 LINES
    ------------------------------------------------------------------------------------------------------------------
      18 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
      23 | ERROR   | Missing short description in doc comment
      28 | ERROR   | Missing short description in doc comment
      33 | ERROR   | Missing short description in doc comment
      38 | ERROR   | Missing short description in doc comment
      43 | ERROR   | Missing short description in doc comment
      48 | ERROR   | Missing short description in doc comment
      53 | ERROR   | Missing short description in doc comment
      58 | ERROR   | Missing short description in doc comment
      63 | ERROR   | Missing short description in doc comment
      68 | ERROR   | Missing short description in doc comment
     149 | ERROR   | Missing parameter type
     151 | ERROR   | Missing parameter type
     280 | WARNING | Only string literals should be passed to t() where possible
     337 | ERROR   | Description for the @return value is missing
     378 | ERROR   | Description for the @return value is missing
     407 | ERROR   | Missing short description in doc comment
     408 | ERROR   | Description for the @return value is missing
     417 | ERROR   | Description for the @return value is missing
     441 | ERROR   | Description for the @return value is missing
     459 | ERROR   | Description for the @return value is missing
     479 | ERROR   | Description for the @return value is missing
     540 | ERROR   | Missing parameter type
     542 | ERROR   | Missing parameter type
     605 | ERROR   | Description for the @return value is missing
     618 | ERROR   | Description for the @return value is missing
     634 | ERROR   | Description for the @return value is missing
     644 | ERROR   | Description for the @return value is missing
    ------------------------------------------------------------------------------------------------------------------
    
    
    FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\contrib\background_image\src\BackgroundImageInterface.php
    ------------------------------------------------------------------------------------------------------------------
    FOUND 18 ERRORS AFFECTING 18 LINES
    ------------------------------------------------------------------------------------------------------------------
     112 | ERROR | Missing short description in doc comment
     113 | ERROR | Description for the @return value is missing
     117 | ERROR | Missing short description in doc comment
     118 | ERROR | Description for the @return value is missing
     122 | ERROR | Missing short description in doc comment
     123 | ERROR | Description for the @return value is missing
     127 | ERROR | Missing short description in doc comment
     128 | ERROR | Description for the @return value is missing
     143 | ERROR | Description for the @return value is missing
     176 | ERROR | Description for the @return value is missing
     180 | ERROR | Missing short description in doc comment
     205 | ERROR | Description for the @return value is missing
     216 | ERROR | Description for the @return value is missing
     287 | ERROR | Missing short description in doc comment
     288 | ERROR | Description for the @return value is missing
     295 | ERROR | Description for the @return value is missing
     305 | ERROR | Description for the @return value is missing
     325 | ERROR | Description for the @return value is missing
    ------------------------------------------------------------------------------------------------------------------
    
    
    FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\contrib\background_image\src\BackgroundImageManager.php
    ----------------------------------------------------------------------------------------------------------------
    FOUND 17 ERRORS AND 5 WARNINGS AFFECTING 22 LINES
    ----------------------------------------------------------------------------------------------------------------
      36 | ERROR   | Doc comment is empty
      45 | ERROR   | Missing short description in doc comment
      50 | ERROR   | Missing short description in doc comment
      62 | ERROR   | Missing short description in doc comment
      67 | ERROR   | Missing short description in doc comment
      72 | ERROR   | Missing short description in doc comment
      77 | ERROR   | Missing short description in doc comment
      82 | ERROR   | Missing short description in doc comment
      87 | ERROR   | Missing short description in doc comment
      92 | ERROR   | Missing short description in doc comment
      97 | ERROR   | Missing short description in doc comment
     102 | ERROR   | Missing short description in doc comment
     107 | ERROR   | Missing short description in doc comment
     112 | ERROR   | Missing short description in doc comment
     117 | ERROR   | Parameter $config_factory is not described in comment
     120 | ERROR   | Missing parameter name
     313 | ERROR   | Parameter tags must be defined first in a doc comment
     329 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
     382 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
     457 | WARNING | Unused variable $bundle_entity_type.
     650 | WARNING | Line exceeds 80 characters; contains 82 characters
     750 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    ----------------------------------------------------------------------------------------------------------------
    
    
    FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\contrib\background_image\src\BackgroundImageManagerInterface.php
    -------------------------------------------------------------------------------------------------------------------------
    FOUND 16 ERRORS AFFECTING 16 LINES
    -------------------------------------------------------------------------------------------------------------------------
      16 | ERROR | Doc comment is empty
      24 | ERROR | Missing parameter type
      26 | ERROR | Missing parameter type
      36 | ERROR | Missing parameter comment
      97 | ERROR | Description for the @return value is missing
     104 | ERROR | Description for the @return value is missing
     111 | ERROR | Description for the @return value is missing
     191 | ERROR | Description for the @return value is missing
     207 | ERROR | Description for the @return value is missing
     252 | ERROR | Description for the @return value is missing
     274 | ERROR | Description for the @return value is missing
     281 | ERROR | Description for the @return value is missing
     330 | ERROR | Missing short description in doc comment
     331 | ERROR | Description for the @return value is missing
     340 | ERROR | Missing parameter type
     350 | ERROR | Description for the @return value is missing
    -------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\contrib\background_image\src\BackgroundImageSettings.php
    -----------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------
     200 | WARNING | Unused variable $diff_value.
    -----------------------------------------------------------------------------------------------------------------
    
    
    FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\contrib\background_image\src\BackgroundImageViewBuilder.php
    --------------------------------------------------------------------------------------------------------------------
    FOUND 5 ERRORS AFFECTING 5 LINES
    --------------------------------------------------------------------------------------------------------------------
       1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
      75 | ERROR | [x] Expected 1 blank line before function; 2 found
      80 | ERROR | [x] Expected 1 space between type hint and argument "$entity_display_repository"; 0 found
     305 | ERROR | [ ] Description for the @return value is missing
     323 | ERROR | [x] list(...) is forbidden, use [...] instead.
    --------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------------------------------------------
    
    
    FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\contrib\background_image\src\Cache\Context\BackgroundImageBaseCacheContext.php
    ---------------------------------------------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 3 LINES
    ---------------------------------------------------------------------------------------------------------------------------------------
     14 | ERROR | Missing short description in doc comment
     19 | ERROR | Missing short description in doc comment
     27 | ERROR | Missing parameter comment
    ---------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\contrib\background_image\src\Controller\BackgroundImageCssController.php
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 2 WARNINGS AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     342 | WARNING | The deprecation-version 'drupal:8.0-1.4' does not match the lower-case machine-name standard: drupal:n.n.n or project:n.x-n.n or project:n.x-n.n-label[n]
         |         | or project:n.n.n or project:n.n.n-label[n]
     342 | WARNING | The removal-version 'drupal:8.0-2.0' does not match the lower-case machine-name standard: drupal:n.n.n or project:n.x-n.n or project:n.x-n.n-label[n] or
         |         | project:n.n.n or project:n.n.n-label[n]
     342 | ERROR   | Each @deprecated tag must have a @see tag immediately following it
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\contrib\background_image\src\EventSubscriber\StageFileProxySubscriber.php
    ----------------------------------------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 3 LINES
    ----------------------------------------------------------------------------------------------------------------------------------
      8 | ERROR | Doc comment is empty
     13 | ERROR | Missing short description in doc comment
     14 | ERROR | Missing parameter comment
    ----------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\contrib\background_image\src\Form\BackgroundImageForm.php
    ------------------------------------------------------------------------------------------------------------------
    FOUND 24 ERRORS AND 5 WARNINGS AFFECTING 29 LINES
    ------------------------------------------------------------------------------------------------------------------
      17 | ERROR   | Doc comment is empty
      30 | ERROR   | Missing short description in doc comment
      35 | ERROR   | Missing short description in doc comment
      40 | ERROR   | Missing short description in doc comment
      45 | ERROR   | Missing short description in doc comment
      50 | ERROR   | Missing short description in doc comment
      55 | ERROR   | Missing short description in doc comment
      60 | ERROR   | Missing short description in doc comment
      65 | ERROR   | Missing short description in doc comment
      70 | ERROR   | Missing short description in doc comment
      75 | ERROR   | Missing short description in doc comment
      80 | ERROR   | Missing short description in doc comment
      92 | ERROR   | Missing short description in doc comment
      93 | ERROR   | Missing parameter comment
      94 | ERROR   | Missing parameter comment
      95 | ERROR   | Missing parameter comment
      96 | ERROR   | Missing parameter comment
      98 | ERROR   | Description for the @return value is missing
     582 | WARNING | Do not pass empty strings to t()
     620 | ERROR   | Description for the @return value is missing
     633 | ERROR   | Missing short description in doc comment
     634 | ERROR   | Description for the @return value is missing
     649 | ERROR   | Description for the @return value is missing
     665 | ERROR   | Description for the @return value is missing
     678 | ERROR   | Description for the @return value is missing
     956 | WARNING | Unused variable $target.
     959 | WARNING | Unused variable $target.
     962 | WARNING | Unused variable $target.
     965 | WARNING | Unused variable $target.
    ------------------------------------------------------------------------------------------------------------------
    
    
    FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\contrib\background_image\src\Form\BackgroundImageHandlerForm.php
    -------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
    -------------------------------------------------------------------------------------------------------------------------
     33 | ERROR   | Doc comment is empty
     36 | WARNING | Possible useless method overriding detected
    -------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\contrib\background_image\src\Form\BackgroundImageSettingsForm.php
    --------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    --------------------------------------------------------------------------------------------------------------------------
     17 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
     51 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    --------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\contrib\background_image\src\Plugin\Block\BackgroundImageBlock.php
    ---------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------------------
     9 | ERROR | Missing short description in doc comment
    ---------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\contrib\background_image\src\Plugin\Block\BackgroundImageTextBlock.php
    -------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------------------
     9 | ERROR | Missing short description in doc comment
    -------------------------------------------------------------------------------------------------------------------------------
    
    Time: 2.83 secs; Memory: 20MB
    
  • Shruthi rao โ†’ made their first commit to this issueโ€™s fork.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia pray_12

    Hi,
    I applied MR !6 (#10) and I found that it fixes few of the PHPCS issues and still some errors are found. Hence I will move this to needs work.

    FILE: /background_image/src/Controller/BackgroundImageCssController.php
    ------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 2 WARNINGS AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------------
    342 | WARNING | The deprecation-version 'drupal:8.0-1.4' does not match the lower-case machine-name standard:
    | | drupal:n.n.n or project:n.x-n.n or project:n.x-n.n-label[n] or project:n.n.n or project:n.n.n-label[n]
    342 | WARNING | The removal-version 'drupal:8.0-2.0' does not match the lower-case machine-name standard: drupal:n.n.n
    | | or project:n.x-n.n or project:n.x-n.n-label[n] or project:n.n.n or project:n.n.n-label[n]
    342 | ERROR | Each @deprecated tag must have a @see tag immediately following it
    ------------------------------------------------------------------------------------------------------------------------

    FILE: /background_image/src/Form/BackgroundImageSettingsForm.php
    ---------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------------
    51 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    ---------------------------------------------------------------------------------------------------------------------

    FILE: /background_image/src/Form/BackgroundImageHandlerForm.php
    --------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------------
    36 | WARNING | Possible useless method overriding detected
    --------------------------------------------------------------------------------------------------------------------

    FILE: /background_image/src/Form/BackgroundImageForm.php
    -------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
    -------------------------------------------------------------------------------------------------------------
    611 | WARNING | Do not pass empty strings to t()
    992 | WARNING | Unused variable $target.
    995 | WARNING | Unused variable $target.
    998 | WARNING | Unused variable $target.
    1001 | WARNING | Unused variable $target.
    -------------------------------------------------------------------------------------------------------------

    FILE: background_image/src/BackgroundImageFormTrait.php
    -------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------
    300 | WARNING | Only string literals should be passed to t() where possible
    -------------------------------------------------------------------------------------------------------------

    FILE: background_image/src/BackgroundImageManager.php
    -----------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 5 WARNINGS AFFECTING 6 LINES
    -----------------------------------------------------------------------------------------------------------
    339 | ERROR | Parameter tags must be defined first in a doc comment
    355 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    408 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    483 | WARNING | Unused variable $bundle_entity_type.
    676 | WARNING | Line exceeds 80 characters; contains 82 characters
    776 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    -----------------------------------------------------------------------------------------------------------

    FILE: background_image/src/BackgroundImageViewBuilder.php
    ---------------------------------------------------------------------------------------------------------------
    FOUND 4 ERRORS AFFECTING 4 LINES
    ---------------------------------------------------------------------------------------------------------------
    75 | ERROR | [x] Expected 1 blank line before function; 2 found
    80 | ERROR | [x] Expected 1 space between type hint and argument "$entity_display_repository"; 0 found
    305 | ERROR | [ ] Description for the @return value is missing
    323 | ERROR | [x] list(...) is forbidden, use [...] instead.
    ---------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------------

    FILE: background_image/src/BackgroundImageSettings.php
    ------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------
    200 | WARNING | Unused variable $diff_value.
    ------------------------------------------------------------------------------------------------------------

  • First commit to issue fork.
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia pray_12
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia pray_12

    Still few errors and warnings are found

    FILE: /background_image/src/Form/BackgroundImageHandlerForm.php
    --------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------------
     36 | WARNING | Possible useless method overriding detected
    --------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /background_image/src/BackgroundImageFormTrait.php
    -------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------
     300 | WARNING | Only string literals should be passed to t() where possible
    -------------------------------------------------------------------------------------------------------------
    
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia zkhan.aamir

    Issue summary updated.

  • Status changed to Fixed 7 months ago
  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia nigelcunningham Geelong

    Applying the merge request as it stands; it deals with nearly all the complaints.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024