- Issue created by @realsp
- First commit to issue fork.
- Status changed to Needs review
3 months ago 9:54am 29 March 2024 - Status changed to Needs work
3 months ago 3:05pm 29 March 2024 - ๐ต๐ญPhilippines clarkssquared
Hi
I applied and tested MR !4 and I can still see many PHPCS issues
โ opigno_poll git:(master) โ curl https://git.drupalcode.org/project/opigno_poll/-/merge_requests/4.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 22491 0 22491 0 0 38902 0 --:--:-- --:--:-- --:--:-- 39736 patching file opigno_poll.install patching file opigno_poll.links.action.yml patching file opigno_poll.links.menu.yml patching file opigno_poll.module patching file 'src/Form/PollDeleteForm.php' patching file 'src/Form/PollForm.php' patching file 'src/Form/PollViewForm.php' patching file 'src/Plugin/Field/FieldWidget/PollChoiceDefaultWidget.php' patching file 'src/Plugin/migrate/destination/PollVote.php' patching file 'src/Plugin/views/field/PollStatus.php' patching file 'src/PollListBuilder.php' patching file 'src/PollPostRenderCache.php' โ opigno_poll git:(master) โ .. โ contrib git:(master) โ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml opigno_poll FILE: ...s/d9/d9-local/web/modules/contrib/opigno_poll/opigno_poll.links.action.yml -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 6 | ERROR | [x] Expected 1 newline at end of file; 0 found -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: .../Projects/d9/d9-local/web/modules/contrib/opigno_poll/opigno_poll.info.yml -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE -------------------------------------------------------------------------------- 1 | WARNING | Remove "project" from the info file, it will be added by | | drupal.org packaging automatically 1 | WARNING | Remove "datestamp" from the info file, it will be added by | | drupal.org packaging automatically 1 | WARNING | Remove "version" from the info file, it will be added by | | drupal.org packaging automatically -------------------------------------------------------------------------------- FILE: ...ng/Projects/d9/d9-local/web/modules/contrib/opigno_poll/opigno_poll.module -------------------------------------------------------------------------------- FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES -------------------------------------------------------------------------------- 15 | WARNING | Global constants should not be used, move it to a class or | | interface 20 | WARNING | Global constants should not be used, move it to a class or | | interface 236 | ERROR | Doc comment is empty -------------------------------------------------------------------------------- FILE: ...bing-subing/Projects/d9/d9-local/web/modules/contrib/opigno_poll/README.md -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------------- 4 | WARNING | Line exceeds 80 characters; contains 195 characters -------------------------------------------------------------------------------- FILE: ...Projects/d9/d9-local/web/modules/contrib/opigno_poll/src/Form/PollForm.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 96 | ERROR | The array declaration extends to column 95 (the limit is 80). The | | array content should be split up over multiple lines -------------------------------------------------------------------------------- FILE: ...ects/d9/d9-local/web/modules/contrib/opigno_poll/src/Form/PollViewForm.php -------------------------------------------------------------------------------- FOUND 2 ERRORS AND 9 WARNINGS AFFECTING 10 LINES -------------------------------------------------------------------------------- 75 | WARNING | \Drupal calls should be avoided in classes, use dependency | | injection instead 95 | WARNING | \Drupal calls should be avoided in classes, use dependency | | injection instead 126 | WARNING | \Drupal calls should be avoided in classes, use dependency | | injection instead 182 | ERROR | The array declaration extends to column 117 (the limit is 80). | | The array content should be split up over multiple lines 182 | ERROR | The array declaration extends to column 116 (the limit is 80). | | The array content should be split up over multiple lines 242 | WARNING | \Drupal calls should be avoided in classes, use dependency | | injection instead 244 | WARNING | \Drupal calls should be avoided in classes, use dependency | | injection instead 298 | WARNING | \Drupal calls should be avoided in classes, use dependency | | injection instead 299 | WARNING | \Drupal calls should be avoided in classes, use dependency | | injection instead 304 | WARNING | \Drupal calls should be avoided in classes, use dependency | | injection instead 356 | WARNING | \Drupal calls should be avoided in classes, use dependency | | injection instead -------------------------------------------------------------------------------- FILE: .../d9/d9-local/web/modules/contrib/opigno_poll/src/Form/PollSettingsForm.php -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------------- 33 | WARNING | t() calls should be avoided in classes, use | | \Drupal\Core\StringTranslation\StringTranslationTrait and | | $this->t() instead -------------------------------------------------------------------------------- FILE: .../d9-local/web/modules/contrib/opigno_poll/src/PollAccessControlHandler.php -------------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES -------------------------------------------------------------------------------- 23 | ERROR | The array declaration extends to column 109 (the limit is 80). | | The array content should be split up over multiple lines 46 | ERROR | The array declaration extends to column 113 (the limit is 80). | | The array content should be split up over multiple lines -------------------------------------------------------------------------------- FILE: ...g/Projects/d9/d9-local/web/modules/contrib/opigno_poll/src/Entity/Poll.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 290 | ERROR | The array declaration extends to column 102 (the limit is 80). | | The array content should be split up over multiple lines -------------------------------------------------------------------------------- FILE: ...ntrib/opigno_poll/src/Plugin/Field/FieldWidget/PollChoiceDefaultWidget.php -------------------------------------------------------------------------------- FOUND 6 ERRORS AND 1 WARNING AFFECTING 7 LINES -------------------------------------------------------------------------------- 10 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is | | Drupal\Core\Entity\EntityTypeManagerInterface. 38 | ERROR | [ ] Doc comment for parameter $plugin_id does not match actual | | variable name $entity_type_manager 40 | ERROR | [ ] Doc comment for parameter $plugin_definition does not | | match actual variable name $entity_type_manager 42 | ERROR | [ ] Superfluous parameter comment 44 | ERROR | [ ] Superfluous parameter comment 49 | ERROR | [x] Expected 1 blank line after function; 2 found 138 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency | | injection instead -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...9/d9-local/web/modules/contrib/opigno_poll/src/Plugin/Block/ChartBlock.php -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 7 WARNINGS AFFECTING 7 LINES -------------------------------------------------------------------------------- 30 | WARNING | \Drupal calls should be avoided in classes, use dependency | | injection instead 32 | WARNING | \Drupal calls should be avoided in classes, use dependency | | injection instead 36 | WARNING | \Drupal calls should be avoided in classes, use dependency | | injection instead 40 | WARNING | Unused variable $key. 63 | WARNING | \Drupal calls should be avoided in classes, use dependency | | injection instead 73 | WARNING | \Drupal calls should be avoided in classes, use dependency | | injection instead 79 | WARNING | t() calls should be avoided in classes, use | | \Drupal\Core\StringTranslation\StringTranslationTrait and | | $this->t() instead -------------------------------------------------------------------------------- FILE: ...ojects/d9/d9-local/web/modules/contrib/opigno_poll/src/PollVoteStorage.php -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 8 WARNINGS AFFECTING 8 LINES -------------------------------------------------------------------------------- 84 | WARNING | \Drupal calls should be avoided in classes, use dependency | | injection instead 85 | WARNING | \Drupal calls should be avoided in classes, use dependency | | injection instead 136 | WARNING | \Drupal calls should be avoided in classes, use dependency | | injection instead 155 | WARNING | \Drupal calls should be avoided in classes, use dependency | | injection instead 178 | WARNING | \Drupal calls should be avoided in classes, use dependency | | injection instead 189 | WARNING | \Drupal calls should be avoided in classes, use dependency | | injection instead 195 | WARNING | t() calls should be avoided in classes, use | | \Drupal\Core\StringTranslation\StringTranslationTrait and | | $this->t() instead 208 | WARNING | \Drupal calls should be avoided in classes, use dependency | | injection instead -------------------------------------------------------------------------------- Time: 906ms; Memory: 12MB โ contrib git:(master) โ
- Gaurav Gupta Jaipur, Rajasthsan
Gaurav Gupta โ made their first commit to this issueโs fork.
- Status changed to Needs review
2 months ago 10:21am 24 April 2024 - Status changed to Needs work
about 2 months ago 4:11pm 27 April 2024 - ๐ต๐ญPhilippines clarkssquared
I applied MR !4 and I can still see these PHPCS errors
opigno_poll git:(master) โ curl https://git.drupalcode.org/project/opigno_poll/-/merge_requests/4.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 51667 0 51667 0 0 59528 0 --:--:-- --:--:-- --:--:-- 60008 patching file opigno_poll.install patching file opigno_poll.links.action.yml patching file opigno_poll.links.menu.yml patching file opigno_poll.module patching file 'src/Entity/Poll.php' patching file 'src/Form/PollDeleteForm.php' patching file 'src/Form/PollForm.php' patching file 'src/Form/PollSettingsForm.php' patching file 'src/Form/PollViewForm.php' patching file 'src/Plugin/Block/ChartBlock.php' patching file 'src/Plugin/Block/PollRecentBlock.php' patching file 'src/Plugin/Field/FieldWidget/PollChoiceDefaultWidget.php' patching file 'src/Plugin/migrate/destination/PollVote.php' patching file 'src/Plugin/views/field/PollStatus.php' patching file 'src/PollAccessControlHandler.php' patching file 'src/PollInterface.php' patching file 'src/PollListBuilder.php' patching file 'src/PollPostRenderCache.php' patching file 'src/PollVoteStorage.php' โ opigno_poll git:(master) โ .. โ contrib git:(master) โ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml opigno_poll FILE: ...s/d9/d9-local/web/modules/contrib/opigno_poll/opigno_poll.links.action.yml -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 6 | ERROR | [x] Expected 1 newline at end of file; 0 found -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: .../Projects/d9/d9-local/web/modules/contrib/opigno_poll/opigno_poll.info.yml -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE -------------------------------------------------------------------------------- 1 | WARNING | Remove "project" from the info file, it will be added by | | drupal.org packaging automatically 1 | WARNING | Remove "datestamp" from the info file, it will be added by | | drupal.org packaging automatically 1 | WARNING | Remove "version" from the info file, it will be added by | | drupal.org packaging automatically -------------------------------------------------------------------------------- FILE: ...ng/Projects/d9/d9-local/web/modules/contrib/opigno_poll/opigno_poll.module -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 11 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\opigno_poll\PollInterface. -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...bing-subing/Projects/d9/d9-local/web/modules/contrib/opigno_poll/README.md -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------------- 4 | WARNING | Line exceeds 80 characters; contains 195 characters -------------------------------------------------------------------------------- FILE: ...ects/d9/d9-local/web/modules/contrib/opigno_poll/src/Form/PollViewForm.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 14 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\Core\Render\RendererInterface. -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...ntrib/opigno_poll/src/Plugin/Field/FieldWidget/PollChoiceDefaultWidget.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 10 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\Core\Entity\EntityTypeManagerInterface. -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...9/d9-local/web/modules/contrib/opigno_poll/src/Plugin/Block/ChartBlock.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 10 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\opigno_poll\PollVoteStorageInterface. -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...ts/d9/d9-local/web/modules/contrib/opigno_poll/src/PollPostRenderCache.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 7 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\Core\DependencyInjection\ClassResolver. -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...ojects/d9/d9-local/web/modules/contrib/opigno_poll/src/PollVoteStorage.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 8 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\Core\Entity\EntityTypeManagerInterface. -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- Time: 829ms; Memory: 12MB โ contrib git:(master) โ
Hi,
Applied MR!4 and ran phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,yml opigno_poll/, found no phpcs issues.- Status changed to Needs review
29 days ago 12:19pm 28 May 2024 - Gaurav Gupta Jaipur, Rajasthsan
I have confirmed MR applies successfully and no PHPCS issues are pending.