Skip to content

Commit b475590

Browse files
SpacePossumnicolas-grekas
authored andcommitted
[CS][2.7] yoda_style, no_unneeded_curly_braces, no_unneeded_final_method, semicolon_after_instruction
1 parent 373eb89 commit b475590

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

971971
do {
972-
if ($node !== $this->getNode(0) && $node->nodeType === 1) {
972+
if ($node !== $this->getNode(0) && 1 === $node->nodeType) {
973973
$nodes[] = $node;
974974
}
975975
} while ($node = $node->$siblingDir);

Tests/CrawlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ public function testReduce()
295295
{
296296
$crawler = $this->createTestCrawler()->filterXPath('//ul[1]/li');
297297
$nodes = $crawler->reduce(function ($node, $i) {
298-
return $i !== 1;
298+
return 1 !== $i;
299299
});
300300
$this->assertNotSame($nodes, $crawler, '->reduce() returns a new instance of a crawler');
301301
$this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Crawler', $nodes, '->reduce() returns a new instance of a crawler');

0 commit comments

Comments
 (0)