Skip to content

Commit c754dfe

Browse files
Merge branch '2.8' into 3.3
* 2.8: [CS][2.7] yoda_style, no_unneeded_curly_braces, no_unneeded_final_method, semicolon_after_instruction [Filesystem] mirror - fix copying content with same name as source/target. .php_cs.dist - simplify config [WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces
2 parents 7e4ac8e + 8bd4820 commit c754dfe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Crawler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1089,7 +1089,7 @@ protected function sibling($node, $siblingDir = 'nextSibling')
10891089
$nodes = array();
10901090

10911091
do {
1092-
if ($node !== $this->getNode(0) && $node->nodeType === 1) {
1092+
if ($node !== $this->getNode(0) && 1 === $node->nodeType) {
10931093
$nodes[] = $node;
10941094
}
10951095
} while ($node = $node->$siblingDir);

Tests/CrawlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ public function testReduce()
339339
{
340340
$crawler = $this->createTestCrawler()->filterXPath('//ul[1]/li');
341341
$nodes = $crawler->reduce(function ($node, $i) {
342-
return $i !== 1;
342+
return 1 !== $i;
343343
});
344344
$this->assertNotSame($nodes, $crawler, '->reduce() returns a new instance of a crawler');
345345
$this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Crawler', $nodes, '->reduce() returns a new instance of a crawler');

0 commit comments

Comments
 (0)