Skip to content

Commit 8bd4820

Browse files
Merge branch '2.7' into 2.8
* 2.7: [CS][2.7] yoda_style, no_unneeded_curly_braces, no_unneeded_final_method, semicolon_after_instruction
2 parents 9e79442 + b475590 commit 8bd4820

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
@@ -1105,7 +1105,7 @@ protected function sibling($node, $siblingDir = 'nextSibling')
11051105
$nodes = array();
11061106

11071107
do {
1108-
if ($node !== $this->getNode(0) && $node->nodeType === 1) {
1108+
if ($node !== $this->getNode(0) && 1 === $node->nodeType) {
11091109
$nodes[] = $node;
11101110
}
11111111
} while ($node = $node->$siblingDir);

Tests/CrawlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ public function testReduce()
315315
{
316316
$crawler = $this->createTestCrawler()->filterXPath('//ul[1]/li');
317317
$nodes = $crawler->reduce(function ($node, $i) {
318-
return $i !== 1;
318+
return 1 !== $i;
319319
});
320320
$this->assertNotSame($nodes, $crawler, '->reduce() returns a new instance of a crawler');
321321
$this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Crawler', $nodes, '->reduce() returns a new instance of a crawler');

0 commit comments

Comments
 (0)