- Issue created by @paraderojether
- šµšPhilippines paraderojether
I fixed the issues reported by phpcs, please review.
Thank you.
- Issue was unassigned.
- Status changed to Needs review
8 months ago 6:01am 20 August 2024 - Status changed to Needs work
5 months ago 5:51am 6 November 2024 - š®š³India chandansha
I have tested MR 2. As i can see still some error and warning are not resolved.
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig . FILE: /home/chandansha/docker/d10contro/web/modules/custom/layout_builder_paragraphs-3469090/layout_builder_paragraphs.module ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 1 LINE ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 18 | WARNING | All constants defined by a module must be prefixed with the module's name, expected "LAYOUT_BUILDER_PARAGRAPHS_PARAGRAPH_FIELD" but found "PARAGRAPH_FIELD" 18 | WARNING | Global constants should not be used, move it to a class or interface ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- FILE: /home/chandansha/docker/d10contro/web/modules/custom/layout_builder_paragraphs-3469090/src/Form/ModalRemoveBlockForm.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 ------------------------------------------------------------------------------------------------------------------------------ FILE: /home/chandansha/docker/d10contro/web/modules/custom/layout_builder_paragraphs-3469090/src/Form/ModalAddBlockForm.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 --------------------------------------------------------------------------------------------------------------------------- FILE: /home/chandansha/docker/d10contro/web/modules/custom/layout_builder_paragraphs-3469090/src/Form/ModalMoveBlockForm.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 ---------------------------------------------------------------------------------------------------------------------------- FILE: /home/chandansha/docker/d10contro/web/modules/custom/layout_builder_paragraphs-3469090/src/Form/ModalUpdateBlockForm.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 ------------------------------------------------------------------------------------------------------------------------------ FILE: /home/chandansha/docker/d10contro/web/modules/custom/layout_builder_paragraphs-3469090/src/Form/AddParagraphForm.php -------------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES -------------------------------------------------------------------------------------------------------------------------- 19 | WARNING | The class short comment should describe what the class does and not simply repeat the class name 155 | WARNING | Unused variable $value. -------------------------------------------------------------------------------------------------------------------------- FILE: /home/chandansha/docker/d10contro/web/modules/custom/layout_builder_paragraphs-3469090/src/Form/ModalRemoveSectionForm.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 -------------------------------------------------------------------------------------------------------------------------------- FILE: /home/chandansha/docker/d10contro/web/modules/custom/layout_builder_paragraphs-3469090/src/Element/ModalLayoutBuilder.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 ------------------------------------------------------------------------------------------------------------------------------- FILE: /home/chandansha/docker/d10contro/web/modules/custom/layout_builder_paragraphs-3469090/src/Controller/ModalMoveBlockController.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 ---------------------------------------------------------------------------------------------------------------------------------------- FILE: /home/chandansha/docker/d10contro/web/modules/custom/layout_builder_paragraphs-3469090/src/Controller/ModalLayoutRebuildTrait.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 --------------------------------------------------------------------------------------------------------------------------------------- FILE: /home/chandansha/docker/d10contro/web/modules/custom/layout_builder_paragraphs-3469090/layout_builder_paragraphs.api.php ------------------------------------------------------------------------------------------------------------------------------ FOUND 3 ERRORS AFFECTING 3 LINES ------------------------------------------------------------------------------------------------------------------------------ 14 | ERROR | [ ] Description for the @return value is missing 19 | ERROR | [x] Object operator not indented correctly; expected 4 spaces but found 6 37 | ERROR | [ ] Description for the @return value is missing ------------------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------ Time: 175ms; Memory: 10MB
- šµšPhilippines clarkssquared
Hi dhruv
I applied the updated MR !2 and this is the remaining PHPCS issues that phpcs reported.
ā layout_builder_paragraphs git:(1.0.x) curl https://git.drupalcode.org/project/layout_builder_paragraphs/-/merge_requests/2.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 26498 0 26498 0 0 45536 0 --:--:-- --:--:-- --:--:-- 46163 patching file layout_builder_paragraphs.api.php patching file layout_builder_paragraphs.module patching file 'src/Controller/ChooseParagraphController.php' patching file 'src/Controller/ModalLayoutRebuildTrait.php' patching file 'src/Controller/ModalMoveBlockController.php' patching file 'src/Element/ModalLayoutBuilder.php' patching file 'src/Form/AddParagraphForm.php' patching file 'src/Form/ModalAddBlockForm.php' patching file 'src/Form/ModalMoveBlockForm.php' patching file 'src/Form/ModalRemoveBlockForm.php' patching file 'src/Form/ModalRemoveSectionForm.php' patching file 'src/Form/ModalUpdateBlockForm.php' patching file 'src/Routing/RouteSubscriber.php' ā layout_builder_paragraphs git:(1.0.x) ā .. ā contrib git:(main) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml layout_builder_paragraphs FILE: ...odules/contrib/layout_builder_paragraphs/layout_builder_paragraphs.api.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 20 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4 -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...modules/contrib/layout_builder_paragraphs/layout_builder_paragraphs.module -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 1 LINE -------------------------------------------------------------------------------- 18 | WARNING | All constants defined by a module must be prefixed with the | | module's name, expected | | "LAYOUT_BUILDER_PARAGRAPHS_PARAGRAPH_FIELD" but found | | "PARAGRAPH_FIELD" 18 | WARNING | Global constants should not be used, move it to a class or | | interface -------------------------------------------------------------------------------- FILE: ...eb/modules/contrib/layout_builder_paragraphs/src/Form/AddParagraphForm.php -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------------- 155 | WARNING | Unused variable $value. -------------------------------------------------------------------------------- Time: 329ms; Memory: 10MB ā contrib git:(main) ā
- First commit to issue fork.