Fix the errors/warnings reported by PHP_CodeSniffer.

Created on 5 January 2024, 11 months ago
Updated 9 July 2024, 5 months ago

Problem/Motivation

Steps to reproduce

Running phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig shows the following warnings/errors, which should be fixed.

FILE: ...s/contrib/imce/tests/src/Kernel/Plugin/ImcePlugin/ResizeTest.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
 154 | ERROR | [x] list(...) is forbidden, use [...] instead.
 165 | ERROR | [x] list(...) is forbidden, use [...] instead.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...contrib/imce/tests/src/Kernel/Plugin/CKEditorPlugin/ImceTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 6 | ERROR | [x] Use statements should be sorted alphabetically. The
   |       |     first wrong one is
   |       |     Drupal\Core\StringTranslation\StringTranslationTrait.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...ules/contrib/imce/tests/src/Kernel/Form/ImceSettingsFormTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 8 | ERROR | [x] Use statements should be sorted alphabetically. The
   |       |     first wrong one is
   |       |     Drupal\Core\StringTranslation\StringTranslationTrait.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...contrib/imce/tests/src/Kernel/Form/ImceProfileDeleteFormTest.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 6 | ERROR | [x] Use statements should be sorted alphabetically. The
   |       |     first wrong one is
   |       |     Drupal\Core\StringTranslation\StringTranslationTrait.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /app/web/modules/contrib/imce/imce.module
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 9 | ERROR | [x] Use statements should be sorted alphabetically. The
   |       |     first wrong one is
   |       |     Drupal\Core\Field\WidgetInterface.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /app/web/modules/contrib/imce/src/ImcePluginManager.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
  6 | ERROR | [x] Use statements should be sorted alphabetically. The
    |       |     first wrong one is
    |       |     Drupal\Core\Cache\CacheBackendInterface.
 71 | ERROR | [x] Use null coalesce operator instead of ternary
    |       |     operator.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /app/web/modules/contrib/imce/src/Imce.php
----------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 7 LINES
----------------------------------------------------------------------
   8 | ERROR | [x] Use statements should be sorted alphabetically.
     |       |     The first wrong one is
     |       |     Drupal\Core\Session\AccountProxyInterface.
  46 | ERROR | [x] Use null coalesce operator instead of ternary
     |       |     operator.
  81 | ERROR | [x] Use null coalesce operator instead of ternary
     |       |     operator.
 207 | ERROR | [x] Use null coalesce operator instead of ternary
     |       |     operator.
 258 | ERROR | [x] Use null coalesce operator instead of ternary
     |       |     operator.
 259 | ERROR | [x] Use null coalesce operator instead of ternary
     |       |     operator.
 363 | ERROR | [x] list(...) is forbidden, use [...] instead.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...app/web/modules/contrib/imce/src/Plugin/ImcePlugin/Newfolder.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 7 | ERROR | [x] Use statements should be sorted alphabetically. The
   |       |     first wrong one is Drupal\imce\ImceFM.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /app/web/modules/contrib/imce/src/Plugin/ImcePlugin/Delete.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 7 | ERROR | [x] Use statements should be sorted alphabetically. The
   |       |     first wrong one is Drupal\imce\ImceFM.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /app/web/modules/contrib/imce/src/Plugin/ImcePlugin/Resize.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 7 | ERROR | [x] Use statements should be sorted alphabetically. The
   |       |     first wrong one is Drupal\imce\ImceFM.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /app/web/modules/contrib/imce/src/Plugin/ImcePlugin/Upload.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 7 | ERROR | [x] Use statements should be sorted alphabetically. The
   |       |     first wrong one is Drupal\imce\ImceFM.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /app/web/modules/contrib/imce/src/Plugin/ImcePlugin/Core.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 6 | ERROR | [x] Use statements should be sorted alphabetically. The
   |       |     first wrong one is Drupal\imce\ImceFM.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /app/web/modules/contrib/imce/src/Plugin/CKEditorPlugin/Imce.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 6 | ERROR | [x] Use statements should be sorted alphabetically. The
   |       |     first wrong one is
   |       |     Drupal\ckeditor\CKEditorPluginBase.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /app/web/modules/contrib/imce/src/Plugin/BUEditorPlugin/Imce.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 8 | ERROR | [x] Use statements should be sorted alphabetically. The
   |       |     first wrong one is
   |       |     Drupal\bueditor\BUEditorPluginBase.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: .../web/modules/contrib/imce/src/Controller/ImceFrameController.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 37 | WARNING | \Drupal calls should be avoided in classes, use
    |         | dependency injection instead
----------------------------------------------------------------------


FILE: /app/web/modules/contrib/imce/src/ImcePluginInterface.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 7 | ERROR | [x] Use statements should be sorted alphabetically. The
   |       |     first wrong one is
   |       |     Drupal\Core\Form\FormStateInterface.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /app/web/modules/contrib/imce/src/Entity/ImceProfile.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 77 | ERROR | [x] Use null coalesce operator instead of ternary
    |       |     operator.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /app/web/modules/contrib/imce/src/ImceFileField.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 6 | ERROR | [x] Use statements should be sorted alphabetically. The
   |       |     first wrong one is
   |       |     Drupal\Core\Field\WidgetInterface.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...app/web/modules/contrib/imce/src/Routing/ImceRouteSubscriber.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 6 | ERROR | [x] Use statements should be sorted alphabetically. The
   |       |     first wrong one is
   |       |     Drupal\Core\Routing\RouteSubscriberBase.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /app/web/modules/contrib/imce/src/ImceFM.php
----------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
----------------------------------------------------------------------
   7 | ERROR | [x] Use statements should be sorted alphabetically.
     |       |     The first wrong one is
     |       |     Symfony\Component\HttpFoundation\JsonResponse.
 241 | ERROR | [x] list(...) is forbidden, use [...] instead.
 258 | ERROR | [x] Use null coalesce operator instead of ternary
     |       |     operator.
 339 | ERROR | [x] Use null coalesce operator instead of ternary
     |       |     operator.
 474 | ERROR | [x] Use null coalesce operator instead of ternary
     |       |     operator.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /app/web/modules/contrib/imce/src/ImcePluginBase.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 7 | ERROR | [x] Use statements should be sorted alphabetically. The
   |       |     first wrong one is
   |       |     Drupal\Core\Form\FormStateInterface.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /app/web/modules/contrib/imce/src/Form/ImceSettingsForm.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 172 | ERROR | [x] Use null coalesce operator instead of ternary
     |       |     operator.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /app/web/modules/contrib/imce/src/Form/ImceProfileForm.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
 278 | ERROR | [x] Use null coalesce operator instead of ternary
     |       |     operator.
 284 | ERROR | [x] Use null coalesce operator instead of ternary
     |       |     operator.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇮🇳India Tirupati_Singh

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.

  • Needs subsystem maintainer review

    It is used to alert the maintainer(s) of a particular core subsystem that an issue significantly impacts their subsystem, and their signoff is needed (see the governance policy draft for more information). Also, if you use this tag, make sure the issue component is set to the correct subsystem. If an issue significantly impacts more than one subsystem, use needs framework manager review instead.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @Tirupati_Singh
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.2 & MySQL 8
    last update 11 months ago
    55 pass
  • Issue was unassigned.
  • Status changed to Needs review 11 months ago
  • 🇮🇳India Tirupati_Singh

    Fixed phpcs coding standard issues. Please review.

  • Status changed to Needs work 9 months ago
  • 🇮🇳India Ashutosh Ahirwal India

    Hi I reviewed the MR in #2 but still there are so many error found by phpcs command

    Used command with argument is:-
    ./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/modules/custom/imce

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/css/imce.icons.css
    ------------------------------------------------------------------------------------------------
    FOUND 6 ERRORS AFFECTING 3 LINES
    ------------------------------------------------------------------------------------------------
    5 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
    5 | ERROR | [ ] No style definition found on line; check for missing colon
    6 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
    6 | ERROR | [ ] No style definition found on line; check for missing colon
    7 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
    7 | ERROR | [ ] No style definition found on line; check for missing colon
    ------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/imce.Folder.js
    -------------------------------------------------------------------------------------------------
    FOUND 31 ERRORS AFFECTING 31 LINES
    -------------------------------------------------------------------------------------------------
    32 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    187 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    235 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    241 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
    268 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
    273 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
    313 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    344 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    369 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    375 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    395 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    397 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
    398 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    410 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    418 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    551 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    576 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    587 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    620 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
    623 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
    676 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    681 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    685 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    691 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    695 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    720 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    745 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
    752 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    754 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
    772 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    786 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    -------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 31 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/imce.js
    --------------------------------------------------------------------------------------------------
    FOUND 71 ERRORS AFFECTING 69 LINES
    --------------------------------------------------------------------------------------------------
    274 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
    276 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
    393 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
    439 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
    542 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    545 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    553 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
    587 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
    621 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
    632 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    675 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
    676 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    679 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
    680 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    683 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    701 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    705 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    714 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    716 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    725 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    728 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    737 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    739 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    748 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    754 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    759 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    761 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    770 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    777 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    779 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    786 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    789 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    791 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    793 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
    919 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
    919 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
    920 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    1039 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
    1039 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
    1040 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    1089 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
    1138 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
    1180 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    1185 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    1199 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
    1234 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    1274 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
    1289 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
    1297 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    1319 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    1336 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    1337 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
    1338 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    1342 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    1368 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    1373 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
    1406 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    1474 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
    1488 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    1497 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    1596 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
    1615 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    1619 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    1772 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
    1831 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    1857 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    1883 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    1954 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    1976 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
    2041 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    2044 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    --------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 71 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/imce.File.js
    ---------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    ---------------------------------------------------------------------------------------------
    31 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    57 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
    ---------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/imce.input.js
    ----------------------------------------------------------------------------------------------
    FOUND 5 ERRORS AFFECTING 5 LINES
    ----------------------------------------------------------------------------------------------
    26 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
    34 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
    49 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
    54 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    98 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
    ----------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/plugins/ckeditor/imce.ckeditor.js
    ------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------
    90 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
    ------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/plugins/bueditor/imce.bueditor.js
    ------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------
    54 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
    ------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/plugins/ckeditor5/imce.ckeditor5.js
    --------------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    --------------------------------------------------------------------------------------------------------------------
    86 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    122 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    --------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/plugins/imce/imce.newfolder.js
    ---------------------------------------------------------------------------------------------------------------
    FOUND 4 ERRORS AFFECTING 4 LINES
    ---------------------------------------------------------------------------------------------------------------
    48 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    59 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    63 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    65 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    ---------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/plugins/imce/imce.upload.js
    ------------------------------------------------------------------------------------------------------------
    FOUND 19 ERRORS AFFECTING 19 LINES
    ------------------------------------------------------------------------------------------------------------
    39 | ERROR | [ ] String concat is not required here; use a single string instead
    40 | ERROR | [ ] String concat is not required here; use a single string instead
    42 | ERROR | [ ] String concat is not required here; use a single string instead
    45 | ERROR | [ ] String concat is not required here; use a single string instead
    47 | ERROR | [ ] String concat is not required here; use a single string instead
    86 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    94 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    98 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    112 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    116 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    119 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    126 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    136 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    146 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    150 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    153 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    215 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    230 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
    235 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    ------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 14 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/plugins/imce/imce.UploadQueue.js
    -----------------------------------------------------------------------------------------------------------------
    FOUND 17 ERRORS AFFECTING 17 LINES
    -----------------------------------------------------------------------------------------------------------------
    61 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    62 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    73 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    74 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    141 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    197 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    198 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    206 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
    262 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
    276 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    291 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    308 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    316 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
    333 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
    352 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    354 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    361 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    -----------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 17 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/plugins/imce/imce.resize.js
    ------------------------------------------------------------------------------------------------------------
    FOUND 5 ERRORS AFFECTING 5 LINES
    ------------------------------------------------------------------------------------------------------------
    37 | ERROR | [ ] String concat is not required here; use a single string instead
    40 | ERROR | [ ] String concat is not required here; use a single string instead
    43 | ERROR | [ ] String concat is not required here; use a single string instead
    74 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    102 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
    ------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/imce.Item.js
    -------------------------------------------------------------------------------------------------
    FOUND 12 ERRORS AFFECTING 11 LINES
    -------------------------------------------------------------------------------------------------
    370 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    392 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
    411 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    428 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    428 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    443 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    458 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    470 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
    486 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
    489 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
    505 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    516 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    -------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 12 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/imce.Tbb.js
    -------------------------------------------------------------------------------------------------
    FOUND 9 ERRORS AFFECTING 9 LINES
    -------------------------------------------------------------------------------------------------
    90 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    94 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    114 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    150 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
    155 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    160 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    175 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    179 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
    208 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    -------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/js/imce.filefield.js
    --------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    --------------------------------------------------------------------------------------------------
    76 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
    84 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    --------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/imce/tests/src/Kernel/CKE4to5UpgradePathTest.php
    -------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------------
    3 | ERROR | [x] Expected strict_types=1, found strict_types = 1.
    -------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------------------------------------------

    Time: 1.82 secs; Memory: 32MB

  • Status changed to Needs review 9 months ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.2.1 + Environment: PHP 8.2 & MySQL 8
    last update 9 months ago
    55 pass
  • 🇮🇳India chaitanyadessai Goa

    Fixed errors reported by vendor/bin/phpcs --standard=DrupalPractice,Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig,js web/modules/imce, few left.

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.2.1 + Environment: PHP 8.2 & MySQL 8
    last update 7 months ago
    55 pass
  • 🇮🇳India Tirupati_Singh

    Phpcs is showing the following error on js file along with the other errors, I've fixed all of them except this one as I think this format looks good to me. Phpcs still showing errors even if we use string interpolation in below js file.

    FILE: /app/web/modules/custom/imce/js/plugins/imce/imce.upload.js
    ----------------------------------------------------------------------
    FOUND 5 ERRORS AFFECTING 5 LINES
    ----------------------------------------------------------------------
     39 | ERROR | String concat is not required here; use a single string
        |       | instead
     40 | ERROR | String concat is not required here; use a single string
        |       | instead
     42 | ERROR | String concat is not required here; use a single string
        |       | instead
     45 | ERROR | String concat is not required here; use a single string
        |       | instead
     47 | ERROR | String concat is not required here; use a single string
        |       | instead
    ----------------------------------------------------------------------
    
    
    FILE: /app/web/modules/custom/imce/js/plugins/imce/imce.resize.js
    ----------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 3 LINES
    ----------------------------------------------------------------------
     37 | ERROR | String concat is not required here; use a single string
        |       | instead
     40 | ERROR | String concat is not required here; use a single string
        |       | instead
     43 | ERROR | String concat is not required here; use a single string
        |       | instead
    ----------------------------------------------------------------------
  • Status changed to Needs work 6 months ago
  • Hi,
    @Tirupati_Singh, I've applied your patch on the specified version of the module, apart from the js issues I'm also getting two more issues which are being reported by Phpcs.

    FILE: /app/web/modules/contrib/imce/PATCHES.txt
    ----------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ----------------------------------------------------------------------
     5 | ERROR | [x] Expected 1 newline at end of file; 3 found
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    
    
    FILE: ...modules/contrib/imce/tests/src/Kernel/CKE4to5UpgradePathTest.php
    ----------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ----------------------------------------------------------------------
     3 | ERROR | [x] Expected strict_types=1, found strict_types = 1.
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    
    Time: 987ms; Memory: 34MB
    

    And as far as the errors regarding the js files are concerned, I took a deeper dive into the issue, and discovered that the coding standards that we're passing over here or in general are Drupal and DrupalPractice which doesn't scan the js files by default as the Drupal coding standard is limited to the scanning of these files : php,module,inc,install,test,profile,theme,css,info,txt,md,yml and DrupalPractice scans these following extensions: php,module,inc,install,test,profile,theme,yml
    Both of them are not considering js files by dafault, so we need to include js file explicitly.
    Ref issue: https://github.com/acquia/blt/issues/2861

    And on another issue of D.C it has been stated that eslint should be the preferred tool for finding and fixing js issues, and I also do belief the same, as it provides a more robust way to define rulesets and getting access to a wide repository of pre-defined rulesets like that of airbnb, airbnb-base etc, along with that we can define our custom rulesets or develop custom plugins which can be more fruitful in streamlining dev process.
    Ref link: https://www.drupal.org/project/drupal/issues/2975201

    But I got confused on seeing this: https://github.com/acquia/blt/issues/2861
    Where it has been stated that Phpcs can now sniff and lintJs by conforming to the rulesets defined in Core's .eslintrc file. But the issue over that is, it seems that Phpcs is not correctly referring to the Core's eslint rulesets.
    Ref link: https://github.com/acquia/blt/issues/2845

    After all these RnD, I believe that it'll be better to ignore these Js issues as of now, and only target the remaining issues and then it'll be more robust to prepare a module specific .eslintrc file and then running the js linting task over that specified rule. Though for that we need to discuss with the module maintainer and raise a new ticket for the same, as it goes beyond the scope of Phpcs fixes!
    Hence adding the label of 'Needs subsystem maintainer review' and moving it to NW state for fixing the remaining two issues!

  • Assigned to Tirupati_Singh
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.2.1 + Environment: PHP 8.2 & MySQL 8
    last update 6 months ago
    55 pass
  • Issue was unassigned.
  • Status changed to Needs review 6 months ago
  • 🇮🇳India Tirupati_Singh

    @sourojeetpaul, I've fixed the mentioned phpcs issues. Please review.
    On applying the patch below warning is still showing and the new line on PATCHES.txt file is being added by the Cweagan composer patch.

    FILE: /app/web/modules/contrib/imce/PATCHES.txt
    ----------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ----------------------------------------------------------------------
     5 | ERROR | [x] Expected 1 newline at end of file; 3 found
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
  • Status changed to RTBC 6 months ago
  • Hello Tirupati_Singh,
    Yes you're right, the error on the PATCHES.txt is coming from cweagan composer dependency and it'll be dynamically generated everytime on applying patch via composer, so its not an issue of this module.
    The other one which was there, is now resolved after the new commit.
    Hence moving it to RTBC++

    • ufku committed b63d676c on 3.x
      Issue #3412557: Fix phpcs errors and apply some coding standards
      
    • ufku committed f92fe23e on 3.x
      Issue #3412557: Remove trailing comma from function calls/definitions
      
    • ufku committed 2083981f on 3.x
      Issue #3412557: Remove multi-line function declarations
      
  • Status changed to Fixed 6 months ago
  • Status changed to Active 6 months ago
  • Hello @ufku,
    Went through your commits just a while ago and noticed its doing some optimisation and coding standard fixes as well, but I'm afraid that it doesn't addresses the Phpcs reported issues.
    The issue is talking about the errors that are being reported by Phpcs and not other code optimisations, hence I think it would've been better if we had been limited to the issue title only, as it'll be more transparent in future to track changes.

    Not sure why this issue got closed, when you haven't merged the MR which was addressing the same. As a result all the Phpcs issues still persist on the latest tag.
    Merger of the MR could've rightfully solved it.

    It also came to my notice that the recent commits are failing some tests as well along with some warnings, apart from that as the changes have been made directly onto the target branch, resulting in a merge error for the existing MR.

    Would love to hear from you soon. Till then I'm reopening the issue as its still reporting the Phpcs issues:

    FILE: /app/web/modules/contrib/imce/js/imce.js
    ----------------------------------------------------------------------
    FOUND 71 ERRORS AFFECTING 69 LINES
    ----------------------------------------------------------------------
      274 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "NULL" but found "null"
      276 | ERROR | [x] Functions must not contain multiple empty lines
          |       |     in a row; found 2 empty lines
      393 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
      439 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "NULL" but found "null"
      542 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "TRUE" but found "true"
      545 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
      553 | ERROR | [x] Functions must not contain multiple empty lines
          |       |     in a row; found 2 empty lines
      587 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "NULL" but found "null"
      621 | ERROR | [x] Functions must not contain multiple empty lines
          |       |     in a row; found 2 empty lines
      632 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
      675 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "NULL" but found "null"
      676 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
      679 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "NULL" but found "null"
      680 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
      683 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "TRUE" but found "true"
      701 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
      705 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "TRUE" but found "true"
      714 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
      716 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "TRUE" but found "true"
      725 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
      728 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "TRUE" but found "true"
      737 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
      739 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "TRUE" but found "true"
      748 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
      754 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
      759 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
      761 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "TRUE" but found "true"
      770 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
      777 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
      779 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "TRUE" but found "true"
      786 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
      789 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
      791 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "TRUE" but found "true"
      793 | ERROR | [x] Functions must not contain multiple empty lines
          |       |     in a row; found 2 empty lines
      919 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "NULL" but found "null"
      919 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "NULL" but found "null"
      920 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
     1039 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "NULL" but found "null"
     1039 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "NULL" but found "null"
     1040 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
     1089 | ERROR | [x] Functions must not contain multiple empty lines
          |       |     in a row; found 2 empty lines
     1138 | ERROR | [x] Functions must not contain multiple empty lines
          |       |     in a row; found 2 empty lines
     1180 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "TRUE" but found "true"
     1185 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
     1199 | ERROR | [x] Functions must not contain multiple empty lines
          |       |     in a row; found 2 empty lines
     1234 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
     1274 | ERROR | [x] Functions must not contain multiple empty lines
          |       |     in a row; found 2 empty lines
     1289 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "NULL" but found "null"
     1297 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "TRUE" but found "true"
     1319 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "TRUE" but found "true"
     1336 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
     1337 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "NULL" but found "null"
     1338 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
     1342 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "TRUE" but found "true"
     1368 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
     1373 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "NULL" but found "null"
     1406 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "TRUE" but found "true"
     1474 | ERROR | [x] Functions must not contain multiple empty lines
          |       |     in a row; found 2 empty lines
     1488 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
     1497 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
     1596 | ERROR | [x] Functions must not contain multiple empty lines
          |       |     in a row; found 2 empty lines
     1615 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "TRUE" but found "true"
     1619 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
     1772 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "NULL" but found "null"
     1831 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "TRUE" but found "true"
     1857 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
     1883 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
     1954 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "TRUE" but found "true"
     1976 | ERROR | [x] Functions must not contain multiple empty lines
          |       |     in a row; found 2 empty lines
     2041 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "TRUE" but found "true"
     2044 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
          |       |     "FALSE" but found "false"
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 71 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    
    
    FILE: /app/web/modules/contrib/imce/js/imce.input.js
    ----------------------------------------------------------------------
    FOUND 5 ERRORS AFFECTING 5 LINES
    ----------------------------------------------------------------------
     26 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
     34 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
     49 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
     54 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
        |       |     "FALSE" but found "false"
     98 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    
    
    FILE: /app/web/modules/contrib/imce/js/imce.Tbb.js
    ----------------------------------------------------------------------
    FOUND 9 ERRORS AFFECTING 9 LINES
    ----------------------------------------------------------------------
      90 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
      94 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
     114 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     150 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "NULL" but found "null"
     155 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
     160 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     175 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
     179 | ERROR | [x] Functions must not contain multiple empty lines in
         |       |     a row; found 2 empty lines
     208 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    
    
    FILE: /app/web/modules/contrib/imce/js/imce.filefield.js
    ----------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    ----------------------------------------------------------------------
     76 | ERROR | [x] Functions must not contain multiple empty lines in
        |       |     a row; found 2 empty lines
     84 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
        |       |     "FALSE" but found "false"
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    
    
    FILE: /app/web/modules/contrib/imce/js/imce.Folder.js
    ----------------------------------------------------------------------
    FOUND 31 ERRORS AFFECTING 31 LINES
    ----------------------------------------------------------------------
      32 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
     187 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
     235 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     241 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "NULL" but found "null"
     268 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "NULL" but found "null"
     273 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "NULL" but found "null"
     313 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
     344 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
     369 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
     375 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
     395 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     397 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "NULL" but found "null"
     398 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     410 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
     418 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     551 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
     576 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
     587 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     620 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "NULL" but found "null"
     623 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "NULL" but found "null"
     676 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     681 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
     685 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     691 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     695 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
     720 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     745 | ERROR | [x] Functions must not contain multiple empty lines in
         |       |     a row; found 2 empty lines
     752 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     754 | ERROR | [x] Functions must not contain multiple empty lines in
         |       |     a row; found 2 empty lines
     772 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     786 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 31 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    
    
    FILE: /app/web/modules/contrib/imce/js/imce.File.js
    ----------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    ----------------------------------------------------------------------
     31 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
        |       |     "TRUE" but found "true"
     57 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
        |       |     "NULL" but found "null"
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    
    
    FILE: .../web/modules/contrib/imce/js/plugins/ckeditor5/imce.ckeditor5.js
    ----------------------------------------------------------------------
    FOUND 17 ERRORS AFFECTING 6 LINES
    ----------------------------------------------------------------------
      31 | ERROR | [x] Expected 1 space before "?"; 0 found
      31 | ERROR | [x] Expected 1 space after "?"; 0 found
      31 | ERROR | [x] Expected 1 space before "?"; 0 found
      31 | ERROR | [x] Expected 1 space after "?"; 0 found
      31 | ERROR | [x] Expected 1 space before "?"; 0 found
      31 | ERROR | [x] Expected 1 space after "?"; 0 found
      33 | ERROR | [x] Expected 1 space before "?"; 0 found
      33 | ERROR | [x] Expected 1 space after "?"; 0 found
      33 | ERROR | [x] Expected 1 space before "?"; 0 found
      33 | ERROR | [x] Expected 1 space after "?"; 0 found
      35 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
      38 | ERROR | [x] Expected 1 space before "?"; 0 found
      38 | ERROR | [x] Expected 1 space after "?"; 0 found
      38 | ERROR | [x] Expected 1 space before "?"; 0 found
      38 | ERROR | [x] Expected 1 space after "?"; 0 found
      91 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
     127 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 17 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    
    
    FILE: /app/web/modules/contrib/imce/js/plugins/imce/imce.upload.js
    ----------------------------------------------------------------------
    FOUND 19 ERRORS AFFECTING 19 LINES
    ----------------------------------------------------------------------
      39 | ERROR | [ ] String concat is not required here; use a single
         |       |     string instead
      40 | ERROR | [ ] String concat is not required here; use a single
         |       |     string instead
      42 | ERROR | [ ] String concat is not required here; use a single
         |       |     string instead
      45 | ERROR | [ ] String concat is not required here; use a single
         |       |     string instead
      47 | ERROR | [ ] String concat is not required here; use a single
         |       |     string instead
      86 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
      94 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
      98 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
     112 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     116 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     119 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
     126 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     136 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     146 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     150 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     153 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     215 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     230 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "NULL" but found "null"
     235 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 14 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    
    
    FILE: /app/web/modules/contrib/imce/js/plugins/imce/imce.resize.js
    ----------------------------------------------------------------------
    FOUND 5 ERRORS AFFECTING 5 LINES
    ----------------------------------------------------------------------
      37 | ERROR | [ ] String concat is not required here; use a single
         |       |     string instead
      40 | ERROR | [ ] String concat is not required here; use a single
         |       |     string instead
      43 | ERROR | [ ] String concat is not required here; use a single
         |       |     string instead
      74 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     102 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "NULL" but found "null"
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    
    
    FILE: /app/web/modules/contrib/imce/js/plugins/imce/imce.newfolder.js
    ----------------------------------------------------------------------
    FOUND 4 ERRORS AFFECTING 4 LINES
    ----------------------------------------------------------------------
     48 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
        |       |     "FALSE" but found "false"
     59 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
        |       |     "FALSE" but found "false"
     63 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
        |       |     "FALSE" but found "false"
     65 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
        |       |     "TRUE" but found "true"
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    
    
    FILE: ...app/web/modules/contrib/imce/js/plugins/imce/imce.UploadQueue.js
    ----------------------------------------------------------------------
    FOUND 17 ERRORS AFFECTING 17 LINES
    ----------------------------------------------------------------------
      61 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
      62 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
      73 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
      74 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     141 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
     197 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     198 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     206 | ERROR | [x] Functions must not contain multiple empty lines in
         |       |     a row; found 2 empty lines
     262 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "NULL" but found "null"
     276 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
     291 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     308 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
     316 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "NULL" but found "null"
     333 | ERROR | [x] Functions must not contain multiple empty lines in
         |       |     a row; found 2 empty lines
     352 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
     354 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     361 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 17 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    
    
    FILE: ...pp/web/modules/contrib/imce/js/plugins/bueditor/imce.bueditor.js
    ----------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ----------------------------------------------------------------------
     54 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
        |       |     "NULL" but found "null"
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    
    
    FILE: /app/web/modules/contrib/imce/js/imce.Item.js
    ----------------------------------------------------------------------
    FOUND 12 ERRORS AFFECTING 11 LINES
    ----------------------------------------------------------------------
     370 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
     392 | ERROR | [x] Functions must not contain multiple empty lines in
         |       |     a row; found 2 empty lines
     411 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
     428 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     428 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
     443 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "TRUE" but found "true"
     458 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     470 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "NULL" but found "null"
     486 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
     489 | ERROR | [x] Functions must not contain multiple empty lines in
         |       |     a row; found 2 empty lines
     505 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
     516 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
         |       |     "FALSE" but found "false"
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 12 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    
    
    FILE: /app/web/modules/contrib/imce/css/imce.icons.css
    ----------------------------------------------------------------------
    FOUND 6 ERRORS AFFECTING 3 LINES
    ----------------------------------------------------------------------
     5 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
       |       |     4
     5 | ERROR | [ ] No style definition found on line; check for missing
       |       |     colon
     6 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
       |       |     4
     6 | ERROR | [ ] No style definition found on line; check for missing
       |       |     colon
     7 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
       |       |     4
     7 | ERROR | [ ] No style definition found on line; check for missing
       |       |     colon
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    
    Time: 679ms; Memory: 34MB
    
  • Status changed to Needs work 6 months ago
  • Also, after applying the patch over the latest release, though it solves most of them as already RTBCed, but now we're getting some errors as well, so we need to incorporate those fixes as well over here and solve the merge error!

    FILE: .../web/modules/contrib/imce/js/plugins/ckeditor5/imce.ckeditor5.js
    ----------------------------------------------------------------------
    FOUND 15 ERRORS AFFECTING 4 LINES
    ----------------------------------------------------------------------
     31 | ERROR | [x] Expected 1 space before "?"; 0 found
     31 | ERROR | [x] Expected 1 space after "?"; 0 found
     31 | ERROR | [x] Expected 1 space before "?"; 0 found
     31 | ERROR | [x] Expected 1 space after "?"; 0 found
     31 | ERROR | [x] Expected 1 space before "?"; 0 found
     31 | ERROR | [x] Expected 1 space after "?"; 0 found
     33 | ERROR | [x] Expected 1 space before "?"; 0 found
     33 | ERROR | [x] Expected 1 space after "?"; 0 found
     33 | ERROR | [x] Expected 1 space before "?"; 0 found
     33 | ERROR | [x] Expected 1 space after "?"; 0 found
     35 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected
        |       |     "TRUE" but found "true"
     38 | ERROR | [x] Expected 1 space before "?"; 0 found
     38 | ERROR | [x] Expected 1 space after "?"; 0 found
     38 | ERROR | [x] Expected 1 space before "?"; 0 found
     38 | ERROR | [x] Expected 1 space after "?"; 0 found
    ----------------------------------------------------------------------
    

    Hence moving it to NW state!

  • Status changed to Fixed 6 months ago
  • @sourojeetpaul This was for php files. The phpcs pipeline succeeds.
    https://git.drupalcode.org/project/imce/-/jobs/1819695

  • Hi @ufku,
    Now I got what was causing the mismatch between your findings and mine. Basically there was version mismatch of php_codesniffer and coder and we were running the standards through. Now updated my version and can confirm no errors are there.
    But one thing caught my attention while going through the artifacts for Phpcs check: https://project.pages.drupalcode.org/-/imce/-/jobs/1819695/artifacts/jun...
    Here I can see we're scanning only the php files in terms of the extension of .php, .module, .install on contrary to that the job is running over Drupal and DrupalPractice coding standards which incorporates other types of file as well like the css file, .md, .yml file etc. So wondering what's the reason for this anomaly?
    Also I can see we're not checking for js files at all, as it doesn't get checked by default by Phpcs. I'm aware that the eslint will be a more robust tool for finding and fixing js errors but as per my findings mentioned on thread #7 🐛 Fix the errors/warnings reported by PHP_CodeSniffer. Fixed Phpcs now uses core's eslint config when we're explicitly forcing Phpcs to check for Js errors. Now as we don't have any custom eslint configured specifically for the module, we can use core's eslint config to address some common issues, and later on if the module incorporates its own eslint config we can move to that certainly.
    As per as the CSS errors are concerned, Phpcs and Phpcbf comes pretty handy to address those, here we're not even using SCSS or POSTCSS so it shouldn't cause any issue as well!

    Can you kindly enlighten me on these?

  • Hi @ufku,
    Haven't heard from you for a while regarding comment #18 🐛 Fix the errors/warnings reported by PHP_CodeSniffer. Fixed .
    Also I can see the issue status has been moved to fixed but none of the contributors have been allotted credit. So can you kindly have a look at it again, and grant credit to the contributors and reviewers their due credit as they've put forward their time and effort in addressing the issue!
    Thanks in advance!

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

Production build 0.71.5 2024