Statistics counter needs to be converted to use short array syntax as per new coding standard.

Comments

Pavan B S created an issue. See original summary.

Pavan B S’s picture

Assigned: Pavan B S » Unassigned
Status: Active » Needs review
StatusFileSize
new4.96 KB

Applying the patch, please review

astonvictor’s picture

StatusFileSize
new7.32 KB

Used the patch #2
+ fixed:

FILE: ...tics_counter/src/EventSubscriber/StatisticsCounterSubscriber.php
----------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 4 LINES
----------------------------------------------------------------------
 17 | ERROR | [x] Visibility must be declared on method
    |       |     "getSubscribedEvents"
 17 | ERROR | [x] Expected 1 blank line before function; 0 found
 28 | ERROR | [x] Visibility must be declared on method
    |       |     "updateStatistics"
 52 | ERROR | [x] Expected 1 blank line after function; 0 found
 53 | ERROR | [x] The closing brace for the class must have an empty
    |       |     line before it
----------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...l8/modules/contrib/statistics_counter/statistics_counter.install
----------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
----------------------------------------------------------------------
  5 | ERROR   | [x] Doc comment short description must end with a
    |         |     full stop
 51 | ERROR   | [x] Expected newline after closing brace
 73 | ERROR   | [x] Expected newline after closing brace
 88 | WARNING | [x] A comma should follow the last multiline array
    |         |     item. Found: 'daycount'
----------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...al8/modules/contrib/statistics_counter/statistics_counter.module
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 5 | ERROR | [x] Doc comment short description must end with a full
   |       |     stop
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: .../modules/contrib/statistics_counter/statistics_counter.views.inc
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 5 | ERROR | [x] Doc comment short description must end with a full
   |       |     stop
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
gisle’s picture

StatusFileSize
new8.47 KB

Patch in comment #3 fails to apply. Re-rolling.

  • AstonVictor authored ba903a7d on 8.x-1.x
    Issue #2862366 by Pavan B S, AstonVictor, gisle: Fixed PHP CS
    
gisle’s picture

Status: Needs review » Fixed

This has been committed to the latest snapshot of 8.x-1.x-dev.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.