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
-----------------------------------------------------------------------------------------------------------------------

CommentFileSizeAuthor
#9 MR!3.png34.64 KBhimanshu_jhaloya
#2 3338152-2.patch4.87 KBnoorulshameera
Command icon 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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

noorulshameera created an issue. See original summary.

noorulshameera’s picture

Status: Active » Needs review
FileSize
4.87 KB

Adding patch to fix PHPCS issue.

Charchil Khandelwal made their first commit to this issue’s fork.

Charchil Khandelwal’s picture

Assigned: Unassigned » Charchil Khandelwal

I will review this patch.

Charchil Khandelwal’s picture

Status: Needs review » Needs work

FILE: ...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.

Charchil Khandelwal’s picture

Assigned: Charchil Khandelwal » Unassigned
Status: Needs work » Needs review

All warnings are fixed now.
Created MR for this issue.
Please review.

himanshu_jhaloya’s picture

Assigned: Unassigned » himanshu_jhaloya
himanshu_jhaloya’s picture

Assigned: himanshu_jhaloya » Unassigned
Status: Needs review » Reviewed & tested by the community
FileSize
34.64 KB

Hi @charchil-khandelwal Reviewed the MR!3 look good checked the phpcs issues no Error & warning was found. Moving to RTBC

dj1999’s picture

Status: Reviewed & tested by the community » Fixed
dj1999’s picture

Status: Fixed » Closed (fixed)