- Issue created by @sidharth_soman
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 2:56pm 5 July 2023 - š®š³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
3 months ago 9:17am 21 August 2024 - šµš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.