- Issue created by @arisen
- Merge request !10Issue #3336879: Drupal Coding Standards Issues | phpcs โ (Open) created by arisen
- Issue was unassigned.
- Status changed to Needs review
almost 2 years ago 2:52pm 27 January 2023 - ๐ฎ๐ณIndia arisen Goa
Created a MR for code standards fix.
Please review. - ๐ฎ๐ณIndia nayana_mvr
Verified the MR and tested it on Drupal version 10.1.x and Google Analytics Reports version 3.x. The patch applied cleanly but I am getting few more errors as follows:
FILE: .../google_analytics_reports/google_analytics_reports.views.inc ----------------------------------------------------------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES ----------------------------------------------------------------------------------------------------------------------------- 117 | ERROR | [x] Array indentation error, expected 10 spaces but found 8 118 | ERROR | [x] Array indentation error, expected 10 spaces but found 8 ----------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------------------------------------------------------------- FILE: .../google_analytics_reports/modules/google_analytics_reports_api/google_analytics_reports_api.module -------------------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES -------------------------------------------------------------------------------------------------------------------------------------------------------------- 11 | ERROR | All functions defined in a module file must be prefixed with the module's name, found "_to_array" but expected | | "google_analytics_reports_api__to_array" 26 | ERROR | All functions defined in a module file must be prefixed with the module's name, found "_ga_convert_dimentrics" but expected | | "google_analytics_reports_api__ga_convert_dimentrics" -------------------------------------------------------------------------------------------------------------------------------------------------------------- FILE: .../google_analytics_reports/src/Plugin/views/filter/GoogleAnalyticsNumeric.php --------------------------------------------------------------------------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES --------------------------------------------------------------------------------------------------------------------------------------------- 260 | ERROR | [x] Array indentation error, expected 10 spaces but found 8 261 | ERROR | [x] Array indentation error, expected 10 spaces but found 8 --------------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY --------------------------------------------------------------------------------------------------------------------------------------------- FILE: .../google_analytics_reports/src/Plugin/views/query/GoogleAnalyticsQuery.php ------------------------------------------------------------------------------------------------------------------------------------------ FOUND 1 ERROR AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------------------------------ 420 | ERROR | [x] Use null coalesce operator instead of ternary operator. ------------------------------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------------------ Time: 510ms; Memory: 14MB
- Assigned to arisen
- Status changed to Needs work
almost 2 years ago 11:42am 6 February 2023 - ๐ฎ๐ณIndia rassoni Bangalore
Rashmisoni โ made their first commit to this issueโs fork.
- Status changed to Needs review
over 1 year ago 8:34am 21 February 2023 - Issue was unassigned.
- Status changed to Needs work
3 months ago 7:33am 15 August 2024 - ๐ต๐ญPhilippines cleavinjosh
Hi @Rassoni,
I applied MR!10, it was not applied smoothly.
These are the issues I encountered after I applied the MR and run
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml
.โ google_analytics_reports git:(4.0.x) curl https://git.drupalcode.org/project/google_analytics_reports/-/merge_requests/10.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 16185 0 16185 0 0 28623 0 --:--:-- --:--:-- --:--:-- 28646 patching file .gitlab/issue_templates/default.md patching file README.md patching file google_analytics_reports.views.inc patching file modules/google_analytics_reports_api/google_analytics_reports_api.module patching file modules/google_analytics_reports_api/src/GoogleAnalyticsReportsApiFeed.php Hunk #1 succeeded at 134 (offset 7 lines). Hunk #2 succeeded at 191 (offset 7 lines). Hunk #3 succeeded at 230 (offset 7 lines). Hunk #4 succeeded at 260 (offset 7 lines). patching file modules/google_analytics_reports_api/tests/src/Unit/GoogleAnalyticsReportsApiFeedTest.php patching file modules/google_analytics_reports_api/tests/src/mock.php patching file src/Form/GoogleAnalyticsReportsAdminSettingsForm.php Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 2 out of 2 hunks ignored -- saving rejects to file src/Form/GoogleAnalyticsReportsAdminSettingsForm.php.rej patching file src/Plugin/views/filter/GoogleAnalyticsNumeric.php patching file src/Plugin/views/query/GoogleAnalyticsQuery.php โ google_analytics_reports git:(4.0.x) โ .. โ contrib phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml google_analytics_reports FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/google_analytics_reports/google_analytics_reports.module ----------------------------------------------------------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES ----------------------------------------------------------------------------------------------------------------------------- 31 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter 44 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter ----------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/google_analytics_reports/modules/google_analytics_reports_api/tests/src/Unit/GoogleAnalyticsReportsApiFeedTest.php --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\google_analytics_reports_api\GoogleAnalyticsReportsApiFeed. 88 | WARNING | [ ] Unused variable $result. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/google_analytics_reports/modules/google_analytics_reports_api/google_analytics_reports_api.api.php ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- 25 | 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/google_analytics_reports/modules/google_analytics_reports_api/src/Form/GoogleAnalyticsReportsApiAdminSettingsForm.php ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ FOUND 3 ERRORS AFFECTING 3 LINES ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 13 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\EntityTypeManagerInterface. 75 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter 102 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/google_analytics_reports/modules/google_analytics_reports_api/src/GoogleAnalyticsReportsApiFeed.php ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ FOUND 3 ERRORS AFFECTING 3 LINES ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 14 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Messenger\MessengerInterface. 53 | ERROR | [x] Whitespace found at end of line 117 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/google_analytics_reports/src/Plugin/views/argument_default/GoogleAnalyticsPath.php ------------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES ------------------------------------------------------------------------------------------------------------------------------------------------------- 36 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter 49 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter ------------------------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/google_analytics_reports/src/Plugin/views/query/GoogleAnalyticsQuery.php ------------------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 5 ERRORS AFFECTING 5 LINES ------------------------------------------------------------------------------------------------------------------------------------------------------------- 28 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\google_analytics_reports_api\GoogleAnalyticsReportsApiFeed. 125 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter 224 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter 296 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter 446 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter ------------------------------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/google_analytics_reports/src/GoogleAnalyticsReports.php ----------------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ----------------------------------------------------------------------------------------------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\google_analytics_reports_api\GoogleAnalyticsReportsApiFeed. ----------------------------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------------------------------------------------------------------------------------------- Time: 884ms; Memory: 14MB โ contrib
Thank you.
- ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
- Status changed to Needs review
3 months ago 4:36pm 15 August 2024