Fix the issues reported by phpcs

Created on 29 July 2022, over 2 years ago
Updated 31 January 2024, 10 months ago

Need to resolved the below errors.

FILE: /drupal/myproject/uikit/STARTERKIT/includes/process.inc
-------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------
20 | WARNING | There must be no blank line following an inline comment
-------------------------------------------------------------------------

FILE: /drupal/myproject/uikit/STARTERKIT/includes/alter.inc
------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------
23 | WARNING | Line exceeds 80 characters; contains 84 characters
25 | WARNING | There must be no blank line following an inline comment
------------------------------------------------------------------------

FILE: /drupal/myproject/uikit/STARTERKIT/includes/theme.inc
------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------
17 | WARNING | There must be no blank line following an inline comment
------------------------------------------------------------------------

FILE: /drupal/myproject/uikit/STARTERKIT/includes/preprocess.inc
-----------------------------------------------------------------------------
FOUND 2 ERRORS AND 13 WARNINGS AFFECTING 15 LINES
-----------------------------------------------------------------------------
20 | WARNING | [ ] There must be no blank line following an inline comment
28 | WARNING | [ ] There must be no blank line following an inline comment
36 | WARNING | [ ] There must be no blank line following an inline comment
44 | WARNING | [ ] There must be no blank line following an inline comment
52 | WARNING | [ ] There must be no blank line following an inline comment
60 | WARNING | [ ] There must be no blank line following an inline comment
63 | WARNING | [ ] Line exceeds 80 characters; contains 86 characters
68 | WARNING | [ ] There must be no blank line following an inline comment
76 | WARNING | [ ] There must be no blank line following an inline comment
84 | WARNING | [ ] There must be no blank line following an inline comment
92 | WARNING | [ ] There must be no blank line following an inline comment
95 | ERROR | [x] Doc comment short description must end with a full stop
100 | WARNING | [ ] There must be no blank line following an inline comment
103 | ERROR | [x] Doc comment short description must end with a full stop
108 | WARNING | [ ] There must be no blank line following an inline comment
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------

FILE: /drupal/myproject/uikit/STARTERKIT/css/STARTERKIT.layout.css
------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------
1 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------

FILE: /drupal/myproject/uikit/STARTERKIT/css/STARTERKIT.component.css
---------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------
1 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------

FILE: /drupal/myproject/uikit/STARTERKIT/css/STARTERKIT.theme.css
-----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------
1 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------

FILE: /drupal/myproject/uikit/STARTERKIT/css/STARTERKIT.base.css
----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------
1 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------

FILE: /drupal/myproject/uikit/STARTERKIT/theme-settings.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
3 | ERROR | [x] There must be one blank line after the last USE statement; 0 found;
11 | ERROR | [ ] Invalid function name, expected s_ta_rt_er_ki_t_form_system_theme_settings_alter but found
| | STARTERKIT_form_system_theme_settings_alter
11 | ERROR | [x] Expected 1 blank line before function; 0 found
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------

FILE: /drupal/myproject/uikit/STARTERKIT/js/STARTERKIT.theme.js
---------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------
14 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------

FILE: /drupal/myproject/uikit/includes/alter.inc
------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------
94 | ERROR | String concat is not required here; use a single string instead
------------------------------------------------------------------------------

FILE: /drupal/myproject/uikit/includes/preprocess.inc
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AND 2 WARNINGS AFFECTING 6 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
96 | ERROR | [x] Short array syntax must be used to define arrays
222 | ERROR | [x] Use null coalesce operator instead of ternary operator.
436 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements
| | hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "*
| | Implements hook_foo_BAR_ID_bar() for block templates."
436 | ERROR | [x] Doc comment short description must end with a full stop
470 | ERROR | [x] Use null coalesce operator instead of ternary operator.
495 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements
| | hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "*
| | Implements hook_foo_BAR_ID_bar() for block templates."
495 | ERROR | [x] Doc comment short description must end with a full stop
518 | ERROR | [x] Use null coalesce operator instead of ternary operator.
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------

FILE: /drupal/myproject/uikit/config/optional/block.block.uikit_main_menu.yml
-----------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------
23 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------

FILE: /drupal/myproject/uikit/css/uikit.dropbutton.css
-----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------
111 | ERROR | [x] Expected 1 space after colon in style definition; 0 found
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------

FILE: /drupal/myproject/uikit/css/uikit.views_ui.admin.theme.css
-----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------
103 | ERROR | [x] Expected 1 space after colon in style definition; 2 found
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------

FILE: /drupal/myproject/uikit/css/uikit.theme.css
----------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
----------------------------------------------------------------------
73 | ERROR | Style definitions must end with a semicolon
76 | ERROR | Style definitions must end with a semicolon
81 | ERROR | Style definitions must end with a semicolon
84 | ERROR | Style definitions must end with a semicolon
----------------------------------------------------------------------

FILE: /drupal/myproject/uikit/css/uikit.base.css
---------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------
6 | ERROR | [x] Expected 1 space after colon in style definition; 0 found
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------

FILE: /drupal/myproject/uikit/src/ScriptHandler.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 5 LINES
----------------------------------------------------------------------------------------------------------------------------
9 | ERROR | [x] Missing class doc comment
10 | ERROR | [x] Missing function doc comment
10 | ERROR | [x] Expected 1 blank line before function; 0 found
26 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
65 | ERROR | [x] Expected 1 blank line after function; 0 found
66 | ERROR | [x] The closing brace for the class must have an empty line before it
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------

FILE: /drupal/myproject/uikit/src/UIkit.php
---------------------------------------------------------------------------------------
FOUND 10 ERRORS AND 1 WARNING AFFECTING 11 LINES
---------------------------------------------------------------------------------------
49 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
104 | ERROR | [x] Expected newline after closing brace
114 | ERROR | [ ] Return type missing for @return tag in function comment
126 | ERROR | [ ] Missing parameter type
132 | ERROR | [ ] Type hint "null" missing for $setting
139 | ERROR | [x] Expected newline after closing brace
283 | ERROR | [x] Expected newline after closing brace
332 | ERROR | [x] Expected newline after closing brace
389 | ERROR | [x] Expected newline after closing brace
409 | ERROR | [x] Expected 1 blank line after function; 0 found
410 | ERROR | [x] The closing brace for the class must have an empty line before it
---------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------

FILE: /drupal/myproject/uikit/theme-settings.php
---------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
---------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
86 | ERROR | [x] Use null coalesce operator instead of ternary operator.
277 | ERROR | [x] Short array syntax must be used to define arrays
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------

FILE: /drupal/myproject/uikit/js/uikit.form-advanced.js
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
32 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: /drupal/myproject/uikit/js/uikit.tableheader.js
----------------------------------------------------------------------------------------------
FOUND 13 ERRORS AFFECTING 13 LINES
----------------------------------------------------------------------------------------------
69 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
76 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
92 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
94 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
96 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
99 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
125 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
128 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
137 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
147 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
148 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
149 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
167 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 13 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------

FILE: /drupal/myproject/uikit/js/uikit.progress.js
-------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 6 LINES
-------------------------------------------------------------------------------------------
11 | ERROR | [ ] String concat is not required here; use a single string instead
13 | ERROR | [ ] String concat is not required here; use a single string instead
14 | ERROR | [ ] String concat is not required here; use a single string instead
16 | ERROR | [ ] String concat is not required here; use a single string instead
49 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
98 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------

FILE: /drupal/myproject/uikit/js/uikit.autocomplete.js
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
16 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: /drupal/myproject/uikit/js/uikit.tableselect.js
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
96 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: /drupal/myproject/uikit/js/uikit.comment-new-indicator.js
---------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
---------------------------------------------------------------------------------------------
36 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
39 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
61 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
85 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
---------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------

FILE: /drupal/myproject/uikit/js/uikit.active-link.js
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
45 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: /drupal/myproject/uikit/js/uikit.theme.js
------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------
18 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
62 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
73 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------

FILE: /drupal/myproject/uikit/js/uikit.admin.js
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
119 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
130 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: /drupal/myproject/uikit/uikit.api.php
-------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------
3 | ERROR | [ ] Missing short description in doc comment
4 | ERROR | [x] The second line in the file doc comment must be "@file"
-------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------

Steps to reproduce

Run following command

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig,js .

Proposed resolution

Work on fixing all issues and create a patch.

📌 Task
Status

Needs work

Version

3.0

Component

Documentation

Created by

🇮🇳India Dharti Patel

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.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The issue summary should always describe what the issue is trying to fix and, in the case, of coding standards issues, show which command has been used, which arguments have been used, and which report that command shown.

  • Status changed to Needs review over 1 year ago
  • 🇮🇳India Ashutosh Ahirwal India

    Providing patch with fixes of phpcs issue using command
    phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/modules/custom/uikit

  • Status changed to Needs work over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The status is for the issue summary, which still does not show the command used to produce that report and which arguments have been passed to that command.

  • 🇮🇳India arpitk

    Updated issues description.

  • 🇮🇳India arpitk

    Hi the patch #10 applied cleanly however there are few more issues needs to be fixed.

    arpitkayare@Arpitk:~/drupal_9.5/web/themes/contrib/uikit$ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig,js .

    FILE: /home/arpitkayare/drupal_9.5/web/themes/contrib/uikit/STARTERKIT/theme-settings.php
    -----------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------------------------------------
    13 | ERROR | Invalid function name, expected s_ta_rt_er_ki_t_form_system_theme_settings_alter but found STARTERKIT_form_system_theme_settings_alter
    -----------------------------------------------------------------------------------------------------------------------------------------------------

    FILE: /home/arpitkayare/drupal_9.5/web/themes/contrib/uikit/STARTERKIT/includes/preprocess.inc
    ----------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 12 WARNINGS AFFECTING 12 LINES
    ----------------------------------------------------------------------------------------------
    20 | WARNING | There must be no blank line following an inline comment
    28 | WARNING | There must be no blank line following an inline comment
    36 | WARNING | There must be no blank line following an inline comment
    44 | WARNING | There must be no blank line following an inline comment
    52 | WARNING | There must be no blank line following an inline comment
    60 | WARNING | There must be no blank line following an inline comment
    70 | WARNING | There must be no blank line following an inline comment
    78 | WARNING | There must be no blank line following an inline comment
    86 | WARNING | There must be no blank line following an inline comment
    94 | WARNING | There must be no blank line following an inline comment
    102 | WARNING | There must be no blank line following an inline comment
    110 | WARNING | There must be no blank line following an inline comment
    ----------------------------------------------------------------------------------------------

    FILE: /home/arpitkayare/drupal_9.5/web/themes/contrib/uikit/STARTERKIT/includes/process.inc
    -------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------
    20 | WARNING | There must be no blank line following an inline comment
    -------------------------------------------------------------------------------------------

    FILE: /home/arpitkayare/drupal_9.5/web/themes/contrib/uikit/STARTERKIT/includes/alter.inc
    -----------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------
    26 | WARNING | There must be no blank line following an inline comment
    -----------------------------------------------------------------------------------------

    FILE: /home/arpitkayare/drupal_9.5/web/themes/contrib/uikit/STARTERKIT/includes/theme.inc
    -----------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------
    17 | WARNING | There must be no blank line following an inline comment
    -----------------------------------------------------------------------------------------

    Thanks!

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Assigned to sourabhjain
  • 🇮🇳India sourabhjain

    Let me work on #13

  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India sourabhjain

    I have fixed all the issues but still below are remaining.

    sourabhjain@LPT-SOURABH uikit % phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml .
    
    FILE: /Users/sourabhjain/www/drupal/modules/contrib/uikit/STARTERKIT/theme-settings.php
    -----------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------------------------------------
     13 | ERROR | Invalid function name, expected s_ta_rt_er_ki_t_form_system_theme_settings_alter but found STARTERKIT_form_system_theme_settings_alter
    -----------------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/sourabhjain/www/drupal/modules/contrib/uikit/src/UIkit.php
    -----------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -----------------------------------------------------------------------
     133 | ERROR | Type hint "null" missing for $setting
    -----------------------------------------------------------------------

    Attaching patch and interdiff file.

  • Status changed to Needs work over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    I did not make a complete review. The following change is not required from the report shown in the issue summary.

       Drupal.theme.progressBar = function (id) {
    -    return '<div id="' + id + '" class="progress" aria-live="polite">' +
    -      '<div class="progress__label">&nbsp;</div>' +
    -      '<div class="progress__track">' +
    -      '<progress class="uk-progress" value="" max="100"></progress>' +
    -      '</div>' +
    -      '<div class="progress__percentage"></div>' +
    -      '<div class="progress__description">&nbsp;</div>' +
    -      '</div>';
    +    return `
    +      < div id = "${id}" class = "progress" aria - live = "polite" >
    +        < div class = "progress__label" > & nbsp; < / div >
    +        < div class = "progress__track" >
    +          < progress class = "uk-progress" value = "" max = "100" > < / progress >
    +        < / div >
    +        < div class = "progress__percentage" > < / div >
    +        < div class = "progress__description" > & nbsp; < / div >
    +      < / div >
    +    `;

    Adding spaces inside HTML tags is also not correct.

  • Assigned to arti_parmar
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India chaitanyadessai Goa

    Please review patch.

  • Status changed to Needs work over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
               var nodeID = $placeholder.closest('[data-history-node-id]').attr('data-history-node-id');
               if (Drupal.history.needsServerCheck(nodeID, commentTimestamp)) {
                 nodeIDs.push(nodeID);
    -            return true;
    +            return TRUE;
               }
               else {
    -            return false;
    +            return FALSE;
    

    In JavaScript, we use true, not TRUE, false instead of FALSE, and null instead of NULL.

    -    return '<div id="' + id + '" class="progress" aria-live="polite">' +
    -      '<div class="progress__label">&nbsp;</div>' +
    -      '<div class="progress__track">' +
    -      '<progress class="uk-progress" value="" max="100"></progress>' +
    -      '</div>' +
    -      '<div class="progress__percentage"></div>' +
    -      '<div class="progress__description">&nbsp;</div>' +
    -      '</div>';
    +    return `
    +      <div id = "${id}" class = "progress" aria-live = "polite">
    +        <div class = "progress__label"> & nbsp; </div>
    +        <div class = "progress__track">
    +          <progress class = "uk-progress" value = "" max = "100" > </progress>
    +        </div>
    +        <div class = "progress__percentage"> </div>
    +        <div class = "progress__description"> & nbsp; </div>
    +      </div>
    +    `;
    

    These changes are still not required by the report shown in the issue summary.
    Furthermore, it is &nbsp;, not & nbsp;. It does not even need spaces before/after a HTML tag.

  • Status changed to Needs review over 1 year ago
  • 🇮🇳India chaitanyadessai Goa

    Please review patch.

  • Status changed to Needs work over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
    -function STARTERKIT_theme_suggestions_alter(array &$suggestions, array $variables) {
    +function STARTERKIT_theme_suggestions_alter(
    +array &$suggestions, array $variables) {

    As per Drupal coding standards, function declarations are written on a single line.

       if ($form_advanced) {
    -    $suggestions[] = 'form_element__' . 'advanced';
    +    $suggestions[] = 'form_element__advanced';
       }

    That change is not fixing a warning/error shown by PHP_CodeSniffer and it is off-topic for this issue.

    -    return '<div id="' + id + '" class="progress" aria-live="polite">' +
    -      '<div class="progress__label">&nbsp;</div>' +
    -      '<div class="progress__track">' +
    -      '<progress class="uk-progress" value="" max="100"></progress>' +
    -      '</div>' +
    -      '<div class="progress__percentage"></div>' +
    -      '<div class="progress__description">&nbsp;</div>' +
    -      '</div>';
    +    return `
    +      <div id="${id}" class="progress" aria-live="polite">
    +        <div class="progress__label">&nbsp;</div>
    +        <div class="progress__track">
    +          <progress class="uk-progress" value="" max="100" > </progress>
    +        </div>
    +        <div class="progress__percentage"> </div>
    +        <div class="progress__description">&nbsp;</div>
    +      </div>
    +    `;

    That change does not fix any error/warning reported by PHP_CodeSniffer and it is off-topic for this issue.

  • Status changed to Needs review over 1 year ago
  • 🇮🇳India sakthi_dev

    Please review.

  • Status changed to Needs work over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
    -    tableOffset: null,
    +    tableOffset: NULL,
     
    -    tableHeight: null,
    +    tableHeight: NULL,
     
    -    stickyVisible: false,
    +    stickyVisible: FALSE,
     
         createSticky: function createSticky() {
    -      var $stickyHeader = this.$originalHeader.clone(true);
    +      var $stickyHeader = this.$originalHeader.clone(TRUE);

    The existing code is already correct, since in JavaScript code we use true, false, and null. PHP_CodeSNiffer applies PHP rules to JavaScript code, which makes those errors/warnings false positive.

    +/**
    + * Class to provide functionality of ScriptHandler.
    + */
     class ScriptHandler {

    That description does not say what is the purpose of that class. That could be said for every class, since every class provide functionality of themselves. The description must say what that functionality is.

    +  /**
    +   * {@inheritdoc}
    +   */
       public static function subtheme(Event $event) {

    A class without parent classes, which does not implemented any interface, does not have inherited methods.

    +   * module_load_include() function, except targeting theme include files.
    +   * It also allows you to place the include files in a sub-directory of the
    +   * theme for better organization.

    Since that comment is changed, it should also be changed to avoid any reference to a deprecated function.

        * @param null $setting
        *   The machine-name of the theme setting to retrieve.
    -   * @param $theme
    +   * @param string $theme

    Since that documentation comment is changed, the type for $setting must be corrected too.

     /**
    - * @mainpage UIkit
    + * @file
    + * Welcome to the UIkit developer's documentation.

    What follows @file is a line with a description of the file content. That is not a description of the file content.

  • 🇮🇳India Yashaswi18

    I tried applying the patch provided in #24, throws error. Comments are yet to be addressed .

Production build 0.71.5 2024