Problem/Motivation
Fix following coding standard issue reported in PHPCS.
FILE: /Applications/MAMP/htdocs/d9/web/modules/contrib/easy_google_analytics_counter/easy_google_analytics_counter.api.php
--------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------
30 | ERROR | Type hint "array" missing for $update_nids
--------------------------------------------------------------------------------------------------------------------------
FILE: /Applications/MAMP/htdocs/d9/web/modules/contrib/easy_google_analytics_counter/src/Form/AdminForm.php
--------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------
119 | ERROR | The array declaration extends to column 98 (the limit is 80). The array content should be split up over multiple lines
--------------------------------------------------------------------------------------------------------------------------------------
FILE: /Applications/MAMP/htdocs/d9/web/modules/contrib/easy_google_analytics_counter/src/ConnectionService.php
-----------------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 6 LINES
-----------------------------------------------------------------------------------------------------------------------------
8 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be referenced with use statements
10 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be referenced with use statements
11 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be referenced with use statements
12 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be referenced with use statements
13 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be referenced with use statements
254 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
-----------------------------------------------------------------------------------------------------------------------
Comment | File | Size | Author |
---|---|---|---|
#9 | MR!3.png | 34.64 KB | himanshu_jhaloya |
#2 | 3338152-2.patch | 4.87 KB | noorulshameera |
Issue fork easy_google_analytics_counter-3338152
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
noorulshameera CreditAttribution: noorulshameera as a volunteer and at Material for Drupal India Association commentedAdding patch to fix PHPCS issue.
Comment #4
Charchil Khandelwal CreditAttribution: Charchil Khandelwal at Dotsquares Ltd. commentedI will review this patch.
Comment #5
Charchil Khandelwal CreditAttribution: Charchil Khandelwal at Dotsquares Ltd. commentedFILE: ...y_google_analytics_counter\easy_google_analytics_counter.api.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
7 | WARNING | @author tags are not usually used in Drupal, because
| | over time multiple contributors will touch the code
| | anyway
31 | WARNING | Unused variable $nid.
----------------------------------------------------------------------
FILE: ...\modules\easy_google_analytics_counter\src\ConnectionService.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------
9 | WARNING | There must be no blank line following an inline
| | comment
14 | WARNING | The class short comment should describe what the
| | class does and not simply repeat the class name
173 | WARNING | Unused variable $reportIndex.
----------------------------------------------------------------------
FILE: ...easy_google_analytics_counter\src\ConnectionServiceInterface.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
7 | WARNING | The class short comment should describe what the class
| | does and not simply repeat the class name
----------------------------------------------------------------------
FILE: ...pal\modules\easy_google_analytics_counter\src\Form\AdminForm.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
14 | WARNING | The class short comment should describe what the
| | class does and not simply repeat the class name
----------------------------------------------------------------------
Need to fix these warnings.
Comment #7
Charchil Khandelwal CreditAttribution: Charchil Khandelwal at Dotsquares Ltd. commentedAll warnings are fixed now.
Created MR for this issue.
Please review.
Comment #8
himanshu_jhaloya CreditAttribution: himanshu_jhaloya commentedComment #9
himanshu_jhaloya CreditAttribution: himanshu_jhaloya commentedHi @charchil-khandelwal Reviewed the MR!3 look good checked the phpcs issues no Error & warning was found. Moving to RTBC
Comment #11
dj1999 CreditAttribution: dj1999 at Brainsum for Tieto commentedComment #12
dj1999 CreditAttribution: dj1999 at Brainsum for Tieto commented