phpcs Drupal coding standard issues

Created on 27 June 2022, almost 3 years ago
Updated 19 July 2024, 11 months ago

FILE: C:\xampp_new\htdocs\contribute\web\modules\custom\group_localized_config\gblc_library\gblc_library.module
---------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------
3 | ERROR | Missing short description in doc comment
---------------------------------------------------------------------------------------------------------------

FILE: C:\xampp_new\htdocs\contribute\web\modules\custom\group_localized_config\gblc_library\src\CommonService.php
-----------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
-----------------------------------------------------------------------------------------------------------------
14 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
17 | ERROR | Missing member variable doc comment
22 | ERROR | Missing parameter comment
31 | ERROR | Public method name "CommonService::CheckIfAdmin" is not in lowerCamel format
-----------------------------------------------------------------------------------------------------------------

FILE: C:\xampp_new\htdocs\contribute\web\modules\custom\group_localized_config\src\Config\GroupLocalizedConfigHandler.php
-------------------------------------------------------------------------------------------------------------------------
FOUND 9 ERRORS AND 1 WARNING AFFECTING 7 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
8 | WARNING | [x] Unused use statement
8 | ERROR | [x] There must be one blank line after the last USE statement; 0 found;
9 | ERROR | [x] Missing class doc comment
11 | ERROR | [ ] Missing member variable doc comment
11 | ERROR | [ ] Class property $config_details should use lowerCamel naming without underscores
40 | ERROR | [x] Expected 1 blank line after function; 0 found
41 | ERROR | [x] The closing brace for the class must have an empty line before it
-------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp_new\htdocs\contribute\web\modules\custom\group_localized_config\src\Form\GroupLocalizedConfigForm.php
---------------------------------------------------------------------------------------------------------------------------------
FOUND 19 ERRORS AND 10 WARNINGS AFFECTING 25 LINES
---------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
13 | WARNING | [x] Unused use statement
14 | WARNING | [x] Unused use statement
24 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
39 | ERROR | [ ] Class property $GroupLocalizedConfigPluginManager should use lowerCamel naming without underscores
62 | ERROR | [ ] Parameter $messenger is not described in comment
62 | ERROR | [ ] Parameter $tempStoreFactory is not described in comment
71 | ERROR | [ ] Doc comment for parameter $language_manager does not match actual variable name $tempStoreFactory
107 | ERROR | [x] Expected 1 space after IF keyword; 0 found
107 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
108 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
109 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
114 | WARNING | [x] A comma should follow the last multiline array item. Found: ''
145 | WARNING | [x] A comma should follow the last multiline array item. Found: 'group_localized_config/group_localized_config'
146 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
209 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
213 | ERROR | [x] Expected 1 space after "="; 2 found
224 | ERROR | [x] Expected 1 space after IF keyword; 0 found
224 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
225 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
226 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
242 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
250 | ERROR | [x] Expected 1 space after "="; 2 found
290 | ERROR | [ ] Function return type is not void, but function is returning void here
301 | WARNING | [x] There must be no blank line following an inline comment
301 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
303 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
322 | ERROR | [x] Expected 1 space after "="; 2 found
415 | WARNING | [x] A comma should follow the last multiline array item. Found: $items
---------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 21 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp_new\htdocs\contribute\web\modules\custom\group_localized_config\src\GroupLocalizedConfigHelper.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: C:\xampp_new\htdocs\contribute\web\modules\custom\group_localized_config\src\GroupLocalizedConfigPluginInterface.php
--------------------------------------------------------------------------------------------------------------------------
FOUND 11 ERRORS AND 2 WARNINGS AFFECTING 13 LINES
--------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
5 | WARNING | [x] Unused use statement
13 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
16 | ERROR | [ ] Parameter $module is not described in comment
19 | ERROR | [x] Data types in @param tags need to be fully namespaced
27 | ERROR | [ ] Expected type hint "StorableConfigBase"; found "GroupLocalizedConfigHandler" for $config
29 | ERROR | [ ] Parameter $module is not described in comment
32 | ERROR | [x] Data types in @param tags need to be fully namespaced
43 | ERROR | [ ] Expected type hint "StorableConfigBase"; found "GroupLocalizedConfigHandler" for $config
45 | ERROR | [ ] Parameter $module is not described in comment
48 | ERROR | [x] Data types in @param tags need to be fully namespaced
58 | ERROR | [x] Separate the @param and @return sections by a blank line.
61 | ERROR | [ ] Expected type hint "StorableConfigBase"; found "GroupLocalizedConfigHandler" for $config
--------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp_new\htdocs\contribute\web\modules\custom\group_localized_config\src\GroupLocalizedConfigPluginManager.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: C:\xampp_new\htdocs\contribute\web\modules\custom\group_localized_config\src\Plugin\GroupLocalizedConfig\GroupLocalizedConfigExamplePlugin.php
----------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 4 WARNINGS AFFECTING 6 LINES
----------------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
5 | WARNING | [x] Unused use statement
34 | WARNING | [ ] Possible useless method overriding detected
66 | WARNING | [x] A comma should follow the last multiline array item. Found: )
73 | WARNING | [x] A comma should follow the last multiline array item. Found: )
92 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
92 | ERROR | [x] Object operator not indented correctly; expected 6 spaces but found 4
----------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------------

🐛 Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

🇮🇳India Harsh panchal

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.

  • 🇮🇳India riddhi.addweb

    Hi, i have tried to apply the "3292826-2" patch, but it is failing.
    Please check the screenshot for the same.

      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 19048  100 19048    0     0   131k      0 --:--:-- --:--:-- --:--:--  131k
    Checking patch gblc_library/gblc_library.module...
    Checking patch gblc_library/src/CommonService.php...
    Checking patch src/Annotation/GroupLocalizedConfigPlugin.php...
    Checking patch src/Config/GroupLocalizedConfigHandler.php...
    Checking patch src/Form/GroupLocalizedConfigForm.php...
    error: while searching for:
       * {@inheritdoc}
       */
      public function buildForm(array $form, FormStateInterface $form_state, $language = NULL) {
        if($this->tempStoreFactory){
        $tempstore = $this->tempStoreFactory->get('common_library');
        $active_tab = $tempstore->get('centralized_config_active_tab');
        }
        $form['current_active_tab'] = [
          '#type' => 'hidden',
          '#attributes' => ['id' => 'current-active-tab'],
          '#default_value' => $active_tab ?? ''
        ];
    
        $first_language = \Drupal::service('common_library.common_service')->getFirstGroupLanguage();
    
    error: patch failed: src/Form/GroupLocalizedConfigForm.php:104
    error: src/Form/GroupLocalizedConfigForm.php: patch does not apply
    Checking patch src/GroupLocalizedConfigPluginInterface.php...
    Checking patch src/Plugin/GroupLocalizedConfig/GroupLocalizedConfigExamplePlugin.php...
    
Production build 0.71.5 2024