- Issue created by @urvashi_vora
- Status changed to Needs work
12 months ago 1:11pm 1 December 2023 - ๐ฎ๐ณIndia Ashutosh Ahirwal India
Provided patch get applied cleanly but still throwing some error.
Used command:-
./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/modules/custom/view_mode_by_owner_roleRemaining issues:-
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/view_mode_by_owner_role/src/Form/SettingsMapRoleViewModeForm.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
6 | 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: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/view_mode_by_owner_role/src/Form/BasicSettingsForm.php
-----------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Config\ConfigFactoryInterface.
-----------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/view_mode_by_owner_role/src/Plugin/Validation/Constraint/UserRoleNumberConstraintValidator.php
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\DependencyInjection\ContainerInjectionInterface.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/view_mode_by_owner_role/src/Hooks/ChangeNodeViewMode.php
-----------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------
8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Config\ConfigFactoryInterface.
-----------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/view_mode_by_owner_role/src/Hooks/EntityUser.php
-----------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------------------
8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\DependencyInjection\ContainerInjectionInterface.
-----------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------------Time: 181ms; Memory: 10MB
- Assigned to nitin_lama
- Issue was unassigned.
- Status changed to Needs review
12 months ago 11:40am 7 December 2023 Hi, reviewed the patch #4, applied cleanly and fixes all phpcs erros/warnings. Thank you!
- ๐ฎ๐ณIndia dev16.addweb
silvi.addweb โ made their first commit to this issueโs fork.
- Status changed to Needs work
4 months ago 6:14am 31 July 2024 Hi @nint_lama,
I applied the patch that you provided and it was applied smoothly, however, the result was opposite to what comment #7 have said. Please see below:
view_mode_by_owner_role git:(1.0.x) curl https://www.drupal.org/files/issues/2023-12-07/coding-standard-fixes_4.patch | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 11283 100 11283 0 0 36209 0 --:--:-- --:--:-- --:--:-- 37735 patching file src/Form/BasicSettingsForm.php patching file src/Form/SettingsChooseRoleForm.php patching file src/Form/SettingsMapRoleViewModeForm.php patching file src/Form/SettingsViewModeMapForm.php patching file src/Hooks/ChangeNodeViewMode.php patching file src/Hooks/EntityUser.php patching file src/Plugin/Validation/Constraint/UserRoleNumberConstraintValidator.php patching file view_mode_by_owner_role.info.yml โ view_mode_by_owner_role git:(1.0.x) โ cd .. โ contrib git:(master) โ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig view_mode_by_owner_role FILE: ...web/modules/contrib/view_mode_by_owner_role/src/Form/BasicSettingsForm.php -------------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 1 LINE -------------------------------------------------------------------------------- 43 | ERROR | [x] Multi-line function declarations must have a trailing comma | | after the last parameter 43 | 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: 254ms; Memory: 10MB
Kindly check
Thanks,
Jake