Views Infinite Scroll module needs to be converted to use short array syntax as per new coding standard.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Venkatesh Rajan.J created an issue. See original summary.

Venkatesh Rajan.J’s picture

Assigned: Unassigned » Venkatesh Rajan.J
Venkatesh Rajan.J’s picture

Assigned: Venkatesh Rajan.J » Unassigned
Status: Active » Needs review
FileSize
702 bytes
s.messaris’s picture

Status: Needs review » Reviewed & tested by the community

This looks good to go, it fixes the only remaining use of the long array syntax.

deepanker_bhalla’s picture

Status: Reviewed & tested by the community » Needs work

@Venkatesh Rajan.J Good work. I can confirm the patch #3 is applying cleanly. Here is the output:

/modules/git/views_infinite_scroll$ git apply -v short_array_syntax-2930654-3.patch

Checking patch views_infinite_scroll.module...
Applied patch views_infinite_scroll.module cleanly.

_________________________________________________________________________________________________________

But after checking with phpcs --standard=Drupal views_infinite_scroll/....... I am getting some more issues i.e.

FILE: /var/www/html/tolearn/modules/git/views_infinite_scroll/tests/src/FunctionalJavascript/InfiniteScrollTest.php
-------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------------
  33 | ERROR | Class constants must be uppercase; expected AJAXWAITDELAY but found ajaxWaitDelay
 119 | ERROR | Type hint "array" missing for $settings
-------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/tolearn/modules/git/views_infinite_scroll/src/EventSubscriber/AjaxResponseSubscriber.php
------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------
 21 | ERROR | Type hint "array" missing for $commands
------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/tolearn/modules/git/views_infinite_scroll/src/Plugin/views/pager/InfiniteScroll.php
-------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
-------------------------------------------------------------------------------------------------------
deepanker_bhalla’s picture

Status: Needs work » Needs review
FileSize
3.73 KB
2.71 KB

Thus updating the patch with resolved issues. Kindly review.

BramDriesen’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me :)

Akanksha92’s picture

@deepanker_bhalla the patch looks good. The patch applied to the module successfully. Please find the attached screenshot for the same.

Honza Pobořil’s picture

Status: Reviewed & tested by the community » Needs work

Needs reroll.

valthebald’s picture

Status: Needs work » Needs review
FileSize
2.42 KB

Here's the rerolled patch. Not producing interdiff, since HEAD has changed significantly since the last check
`phpcs --standard=Drupal` now only reports long lines in README.txt

Neslee Canil Pinto’s picture

This issue is fixed. Thanks

Neslee Canil Pinto’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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