commit 4d93232b3aa9a22b467c4ce476927d591606aa86 Author: Laurie Kaptein Date: Sun Jul 2 14:13:05 2017 +0200 announce-feedback-filtering-block-name-2805205-39.patch. diff --git a/core/modules/block/js/block.js b/core/modules/block/js/block.js index e9a8c732a5..d6b2bf6b3d 100644 --- a/core/modules/block/js/block.js +++ b/core/modules/block/js/block.js @@ -144,4 +144,4 @@ }); } }; -})(jQuery, window, Drupal); \ No newline at end of file +})(jQuery, window, Drupal); diff --git a/core/modules/block/tests/src/FunctionalJavascript/BlockFilterTest.php b/core/modules/block/tests/src/FunctionalJavascript/BlockFilterTest.php index b957a97651..d24ea03a9b 100644 --- a/core/modules/block/tests/src/FunctionalJavascript/BlockFilterTest.php +++ b/core/modules/block/tests/src/FunctionalJavascript/BlockFilterTest.php @@ -50,7 +50,7 @@ public function testBlockFilter() { $filter->setValue('ad'); $session->wait(1000, 'jQuery("#drupal-live-announce").html().indexOf("blocks are available") > -1'); $visible_rows = $this->filterVisibleElements($block_rows); - if(count($block_rows)>0){ + if(count($block_rows)>0) { self::assertNotEquals(count($block_rows), count($visible_rows)); } @@ -78,14 +78,16 @@ public function testBlockFilter() { /** * Removes any non-visible elements from the passed array. * - * @param array $elements - * @return array + * @param NodeElement[] $elements + * An array of node elements. + * + * @return NodeElement[] */ - protected function filterVisibleElements($elements) { - $elements = array_filter($elements, function($element) { + protected function filterVisibleElements(array $elements) { + $elements = array_filter($elements, function(NodeElement $element) { return $element->isVisible(); }); return $elements; } -} \ No newline at end of file +}