Fix the errors/warnings reported by Php_CodeSniffer

Created on 5 July 2023, almost 2 years ago

Problem/Motivation

C:\xampp\htdocs\backendassignment\web\modules\contrib>phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig menu_position

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\menu_position\CHANGELOG.txt
---------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 10 WARNINGS AFFECTING 10 LINES
---------------------------------------------------------------------------------------
  7 | WARNING | Line exceeds 80 characters; contains 87 characters
 11 | WARNING | Line exceeds 80 characters; contains 102 characters
 17 | WARNING | Line exceeds 80 characters; contains 99 characters
 28 | WARNING | Line exceeds 80 characters; contains 87 characters
 36 | WARNING | Line exceeds 80 characters; contains 100 characters
 38 | WARNING | Line exceeds 80 characters; contains 90 characters
 40 | WARNING | Line exceeds 80 characters; contains 99 characters
 41 | WARNING | Line exceeds 80 characters; contains 135 characters
 42 | WARNING | Line exceeds 80 characters; contains 101 characters
 43 | WARNING | Line exceeds 80 characters; contains 87 characters
---------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\menu_position\menu_position.install
-----------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------
 1 | ERROR | [x] Missing file doc comment
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 8 | ERROR | [x] Object operator not indented correctly; expected 4 spaces but found 13
-----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\menu_position\menu_position.module
----------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\menu_position\menu_position.post_update.php
-------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\menu_position\src\Controller\MenuPositionRuleListBuilder.php
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\menu_position\src\Entity\MenuPositionRule.php
-----------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------
   1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 271 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
-----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\menu_position\src\Form\MenuPositionRuleDeleteForm.php
-----------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 23 | ERROR | [ ] Class property $menu_link_manager should use lowerCamel naming without underscores
 30 | ERROR | [ ] Class property $route_builder should use lowerCamel naming without underscores
-----------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\menu_position\src\Form\MenuPositionRuleForm.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 10 ERRORS AND 3 WARNINGS AFFECTING 11 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
  28 | ERROR   | [ ] Class property $entity_type_manager should use lowerCamel naming without underscores
  35 | ERROR   | [ ] Class property $menu_parent_form_selector should use lowerCamel naming without underscores
  42 | ERROR   | [ ] Class property $menu_link_manager should use lowerCamel naming without underscores
  49 | ERROR   | [ ] Class property $condition_plugin_manager should use lowerCamel naming without underscores
  56 | ERROR   | [ ] Class property $context_repository should use lowerCamel naming without underscores
  63 | ERROR   | [ ] Class property $route_builder should use lowerCamel naming without underscores
 249 | ERROR   | [x] list(...) is forbidden, use [...] instead.
 249 | WARNING | [ ] Unused variable $menu_name.
 249 | ERROR   | [ ] The array declaration extends to column 113 (the limit is 80). The array content should be split up over multiple lines
 290 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
 302 | WARNING | [ ] Unused variable $menu_link.
 316 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\menu_position\src\Form\MenuPositionRuleOrderForm.php
----------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 3 WARNINGS AFFECTING 6 LINES
----------------------------------------------------------------------------------------------------------------------
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
  19 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
  34 | ERROR   | [ ] Class property $menu_link_manager should use lowerCamel naming without underscores
  41 | ERROR   | [ ] Class property $route_builder should use lowerCamel naming without underscores
 110 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
 111 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\menu_position\src\Form\MenuPositionSettings.php
---------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
---------------------------------------------------------------------------------------------------------------------
  1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
 15 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
 23 | ERROR   | [ ] Class property $route_builder should use lowerCamel naming without underscores
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\menu_position\src\Menu\MenuPositionActiveTrail.php
--------------------------------------------------------------------------------------------------------------
FOUND 15 ERRORS AND 1 WARNING AFFECTING 16 LINES
--------------------------------------------------------------------------------------------------------------
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
   9 | WARNING | [x] Unused use statement
  29 | ERROR   | [x] Data types in @var tags need to be fully namespaced
  36 | ERROR   | [x] Data types in @var tags need to be fully namespaced
  43 | ERROR   | [x] Data types in @var tags need to be fully namespaced
  50 | ERROR   | [x] Data types in @var tags need to be fully namespaced
  57 | ERROR   | [x] Data types in @var tags need to be fully namespaced
  64 | ERROR   | [x] Data types in @param tags need to be fully namespaced
  66 | ERROR   | [x] Data types in @param tags need to be fully namespaced
  68 | ERROR   | [x] Data types in @param tags need to be fully namespaced
  70 | ERROR   | [x] Data types in @param tags need to be fully namespaced
  72 | ERROR   | [x] Data types in @param tags need to be fully namespaced
  74 | ERROR   | [x] Data types in @param tags need to be fully namespaced
  76 | ERROR   | [x] Data types in @param tags need to be fully namespaced
 211 | ERROR   | [x] Expected 1 blank line after function; 0 found
 212 | ERROR   | [x] The closing brace for the class must have an empty line before it
--------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 16 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\menu_position\src\MenuPositionRuleInterface.php
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\menu_position\src\Plugin\Derivative\MenuPositionLink.php
--------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
--------------------------------------------------------------------------------------------------------------------
  1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
 33 | ERROR   | [ ] Class property $config_factory should use lowerCamel naming without underscores
 68 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
 69 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
--------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\menu_position\src\Plugin\Menu\MenuPositionLink.php
--------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
--------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------

Time: 3.44 secs; Memory: 6MB

Steps to reproduce

Run the phpcs command on the module.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Needs work

Version

1.0

Component

Code

Created by

🇮🇳India sidharth_soman Bangalore

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @sidharth_soman
  • Merge request !6Fixed phpcs issues. → (Open) created by sidharth_soman
  • Issue was unassigned.
  • Status changed to Needs review almost 2 years ago
  • 🇮🇳India sidharth_soman Bangalore

    I've fixed all the errors apart from those about filling out/editing documentation and variable naming conventions. Might be better to leave those out for the maintainers to change as seen fit.

    Please review the MR

  • Status changed to Needs work 8 months ago
  • 🇵🇭Philippines cleavinjosh

    Hi @sidhart_soman,

    I applied MR!6, it was applied smoothly and fixed most of the phpcs issues.

    These are the remaining issues after I ran phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml:

    ➜  menu_position git:(8.x-1.x) curl https://git.drupalcode.org/project/menu_position/-/merge_requests/6.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  7884    0  7884    0     0  18144      0 --:--:-- --:--:-- --:--:-- 18124
    patching file menu_position.install
    patching file src/Form/MenuPositionRuleForm.php
    patching file src/Form/MenuPositionRuleOrderForm.php
    patching file src/Form/MenuPositionSettings.php
    patching file src/Menu/MenuPositionActiveTrail.php
    patching file src/Plugin/Derivative/MenuPositionLink.php
    ➜  menu_position git:(8.x-1.x) ✗ ..
    ➜  contrib phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig menu_position
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/menu_position/CHANGELOG.txt
    ------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 10 WARNINGS AFFECTING 10 LINES
    ------------------------------------------------------------------------------------------------
      7 | WARNING | Line exceeds 80 characters; contains 87 characters
     11 | WARNING | Line exceeds 80 characters; contains 102 characters
     17 | WARNING | Line exceeds 80 characters; contains 99 characters
     28 | WARNING | Line exceeds 80 characters; contains 87 characters
     36 | WARNING | Line exceeds 80 characters; contains 100 characters
     38 | WARNING | Line exceeds 80 characters; contains 90 characters
     40 | WARNING | Line exceeds 80 characters; contains 99 characters
     41 | WARNING | Line exceeds 80 characters; contains 135 characters
     42 | WARNING | Line exceeds 80 characters; contains 101 characters
     43 | WARNING | Line exceeds 80 characters; contains 87 characters
    ------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/menu_position/src/Form/MenuPositionRuleOrderForm.php
    --------------------------------------------------------------------------------------------------------------------------------------
    FOUND 5 ERRORS AND 1 WARNING AFFECTING 5 LINES
    --------------------------------------------------------------------------------------------------------------------------------------
     12 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Menu\MenuLinkManagerInterface.
     19 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
     34 | ERROR   | [ ] Class property $menu_link_manager should use lowerCamel naming without underscores
     41 | ERROR   | [ ] Class property $route_builder should use lowerCamel naming without underscores
     50 | ERROR   | [x] Multi-line function declarations must have a trailing comma after the last parameter
     50 | ERROR   | [x] The closing parenthesis of a multi-line function declaration must be on a new line
    --------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/menu_position/src/Form/MenuPositionRuleForm.php
    ---------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 9 ERRORS AND 2 WARNINGS AFFECTING 10 LINES
    ---------------------------------------------------------------------------------------------------------------------------------------------------
      14 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Plugin\Context\ContextRepositoryInterface.
      28 | ERROR   | [ ] Class property $entity_type_manager should use lowerCamel naming without underscores
      35 | ERROR   | [ ] Class property $menu_parent_form_selector should use lowerCamel naming without underscores
      42 | ERROR   | [ ] Class property $menu_link_manager should use lowerCamel naming without underscores
      49 | ERROR   | [ ] Class property $condition_plugin_manager should use lowerCamel naming without underscores
      56 | ERROR   | [ ] Class property $context_repository should use lowerCamel naming without underscores
      63 | ERROR   | [ ] Class property $route_builder should use lowerCamel naming without underscores
      90 | ERROR   | [x] Multi-line function declarations must have a trailing comma after the last parameter
      90 | ERROR   | [x] The closing parenthesis of a multi-line function declaration must be on a new line
     249 | WARNING | [ ] Unused variable $menu_name.
     302 | WARNING | [ ] Unused variable $menu_link.
    ---------------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/menu_position/src/Form/MenuPositionSettings.php
    --------------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    --------------------------------------------------------------------------------------------------------------------
     23 | ERROR | [ ] Class property $route_builder should use lowerCamel naming without underscores
     30 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
    --------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/menu_position/src/Form/MenuPositionRuleDeleteForm.php
    --------------------------------------------------------------------------------------------------------------------------
    FOUND 4 ERRORS AFFECTING 3 LINES
    --------------------------------------------------------------------------------------------------------------------------
     23 | ERROR | [ ] Class property $menu_link_manager should use lowerCamel naming without underscores
     30 | ERROR | [ ] Class property $route_builder should use lowerCamel naming without underscores
     45 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
     45 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
    --------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/menu_position/src/Entity/MenuPositionRule.php
    -------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------
     271 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
    -------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/menu_position/src/Plugin/Derivative/MenuPositionLink.php
    -----------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------------
     33 | ERROR | Class property $config_factory should use lowerCamel naming without underscores
    -----------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/menu_position/src/Plugin/Menu/MenuPositionLink.php
    --------------------------------------------------------------------------------------------------------------------------
    FOUND 12 ERRORS AFFECTING 10 LINES
    --------------------------------------------------------------------------------------------------------------------------
      96 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket
      97 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 2
      98 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 2
      99 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 2
     100 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     101 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 2
     102 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 2
     103 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     104 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 2
     105 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 2
     105 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
     105 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
    --------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 12 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/menu_position/src/Menu/MenuPositionActiveTrail.php
    -----------------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------
     85 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
     85 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
    -----------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------------------------
    
    Time: 433ms; Memory: 12MB
    
    ➜  contrib

    Thank you.

  • 🇵🇭Philippines cleavinjosh

    Hi @dhruv.mittal,

    Thank you for updating the MR. I applied MR!6, it was applied smoothly and fixed most of the phpcs issues.

    These are the remaining issues after I ran phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml:

    ➜  menu_position git:(8.x-1.x) curl https://git.drupalcode.org/project/menu_position/-/merge_requests/6.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 30098    0 30098    0     0  69865      0 --:--:-- --:--:-- --:--:-- 69832
    patching file CHANGELOG.txt
    patching file menu_position.install
    patching file src/Entity/MenuPositionRule.php
    patching file src/Form/MenuPositionRuleDeleteForm.php
    patching file src/Form/MenuPositionRuleForm.php
    patching file src/Form/MenuPositionRuleOrderForm.php
    patching file src/Form/MenuPositionSettings.php
    patching file src/Menu/MenuPositionActiveTrail.php
    patching file src/Plugin/Derivative/MenuPositionLink.php
    patching file src/Plugin/Menu/MenuPositionLink.php
    ➜  menu_position git:(8.x-1.x) ✗ ..
    ➜  contrib git:(main) ✗ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml menu_position
    
    FILE: /Users/interns/Demo-site/drupal_11_test/install-dir/drupal_11_test_site/web/modules/contrib/menu_position/src/Form/MenuPositionRuleForm.php
    -------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    -------------------------------------------------------------------------------------------------------------------------------------------------
     250 | WARNING | Unused variable $menu_name.
     303 | WARNING | Unused variable $menu_link.
    -------------------------------------------------------------------------------------------------------------------------------------------------
    
    Time: 520ms; Memory: 12MB
    
    ➜  contrib git:(main) ✗

    Please check and advise.
    Thank you.

  • 🇮🇳India akulsaxena

    Hi @dhruv.mittal

    Thank you for updating the MR. I applied MR!6, it was applied smoothly and fixed all of the phpcs issues.
    Thank you
    Moving it to RTBC+

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    Since GitLab CI is enabled for every project, that should be used to get the list of the PHP_CodeSniffer errors/warnings to fix.

  • 🇮🇳India akulsaxena

    Added gitlab-ci file and rebased

  • Pipeline finished with Success
    4 months ago
    Total: 147s
    #367308
  • 🇮🇳India akulsaxena

    The phpcs pipeline is passing and no errors/warnings were reported
    Moving to RTBC+

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    People who change the code in the issue fork cannot change the status to Reviewed & tested by the community.
    See my previous comment, to understand what it needs to be done.

  • First commit to issue fork.
  • 🇨🇦Canada imustakim Canada
  • Pipeline finished with Success
    3 months ago
    Total: 234s
    #378230
  • Pipeline finished with Success
    3 months ago
    Total: 143s
    #380723
  • Pipeline finished with Success
    3 months ago
    Total: 145s
    #380724
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    avpaderno → changed the visibility of the branch 3372605-gitlab-ci-reports to hidden.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The merge request changes 10 files, but the report is for nine files.

  • Pipeline finished with Canceled
    3 months ago
    Total: 73s
    #394473
  • Pipeline finished with Success
    3 months ago
    Total: 141s
    #394475
  • 🇮🇳India akulsaxena

    Removed out of scope changes

  • Status changed to Needs review 3 months ago
  • 🇵🇭Philippines roberttabigue

    Hi @akulsaxena,

    I reviewed the PHPCS in the GitLab CI pipeline and confirmed that the PHPCS errors no longer exist. Here is the link for reference: https://git.drupalcode.org/issue/menu_position-3372605/-/jobs/4005447."

    unning with gitlab-runner 17.7.0 (3153ccc6)
      on gitlab-runner-564784654-4shlp s8ex1X2yJ, system ID: r_gVw7gScOvZha
    Resolving secrets
    Preparing the "kubernetes" executor
    00:00
    "CPURequest" overwritten with "2"
    Using Kubernetes namespace: gitlab-runner
    Using Kubernetes executor with image drupalci/php-8.3-ubuntu-apache:production ...
    Using attach strategy to execute scripts...
    Preparing environment
    00:31
    Using FF_USE_POD_ACTIVE_DEADLINE_SECONDS, the Pod activeDeadlineSeconds will be set to the job timeout: 1h0m0s...
    Waiting for pod gitlab-runner/runner-s8ex1x2yj-project-115373-concurrent-0-39yg0y93 to be running, status is Pending
    Running on runner-s8ex1x2yj-project-115373-concurrent-0-39yg0y93 via gitlab-runner-564784654-4shlp...
    Getting source from Git repository
    00:01
    Fetching changes...
    Initialized empty Git repository in /builds/issue/menu_position-3372605/.git/
    Created fresh repository.
    Checking out e1946f76 as detached HEAD (ref is 3372605-fix-the-errorswarnings)...
    Skipping Git submodules setup
    Downloading artifacts
    00:14
    Downloading artifacts for composer (4002465)...
    Downloading artifacts from coordinator... ok        host=drupal-gitlab-job-artifacts.s3.us-west-2.amazonaws.com id=4002465 responseStatus=200 OK token=glcbt-64
    Executing "step_script" stage of the job script
    00:01
    $ test -f phpcs.xml.dist || curl -OL https://git.drupalcode.org/$_CURL_TEMPLATES_REPO/-/raw/$_CURL_TEMPLATES_REF/assets/phpcs.xml.dist
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   320  100   320    0     0   4749      0 --:--:-- --:--:-- --:--:--  4776
    $ vendor/bin/phpcs --version
    PHP_CodeSniffer version 3.11.2 (stable) by Squiz and PHPCSStandards
    $ composer show | awk '$0 ~ /codesniffer|coder|coding-standard|variable-analysis/ {print $1 " " $2}';
    dealerdirect/phpcodesniffer-composer-installer 1.0.0
    drupal/coder 8.3.27
    sirbrillig/phpcs-variable-analysis 2.11.22
    slevomat/coding-standard 8.15.0
    squizlabs/php_codesniffer 3.11.2
    $ vendor/bin/phpcs --config-show installed_paths
    Using config file: /builds/issue/menu_position-3372605/vendor/squizlabs/php_codesniffer/CodeSniffer.conf
    installed_paths: ../../drupal/coder/coder_sniffer,../../sirbrillig/phpcs-variable-analysis,../../slevomat/coding-standard
    $ vendor/bin/phpcs -i
    The installed coding standards are MySource, PEAR, PSR1, PSR2, PSR12, Squiz, Zend, Drupal, DrupalPractice, VariableAnalysis and SlevomatCodingStandard
    $ vendor/bin/phpcs -s $_WEB_ROOT/modules/custom --report-junit=junit.xml --report-full --report-summary --report-source $_PHPCS_EXTRA
    Uploading artifacts for successful job
    00:02
    Uploading artifacts...
    junit.xml: found 1 matching artifact files and directories 
    Uploading artifacts as "archive" to coordinator... 201 Created  id=4005447 responseStatus=201 Created token=glcbt-64
    Uploading artifacts...
    junit.xml: found 1 matching artifact files and directories 
    Uploading artifacts as "junit" to coordinator... 201 Created  id=4005447 responseStatus=201 Created token=glcbt-64
    Cleaning up project directory and file based variables
    00:00
    Job succeeded

    I'm moving this now to ‘RTBC’.

    Thank you!

Production build 0.71.5 2024