diff --git a/test/PhpParser/CodeTestParser.php b/test/PhpParser/CodeTestParser.php index bde0a5fde5..9f8ed596f2 100644 --- a/test/PhpParser/CodeTestParser.php +++ b/test/PhpParser/CodeTestParser.php @@ -24,7 +24,7 @@ function ($matches) { // multiple sections possible with always two forming a pair $chunks = array_chunk($parts, $chunksPerTest); $tests = []; - foreach ($chunks as $i => $chunk) { + foreach ($chunks as $chunk) { $lastPart = array_pop($chunk); list($lastPart, $mode) = $this->extractMode($lastPart); $tests[] = [$mode, array_merge($chunk, [$lastPart])]; @@ -61,7 +61,7 @@ private function extractMode(string $expected): array { return [$expected, null]; } - $expected = (string) substr($expected, $firstNewLine + 1); + $expected = substr($expected, $firstNewLine + 1); return [$expected, substr($firstLine, 2)]; } } diff --git a/test/PhpParser/Node/Scalar/DNumberTest.php b/test/PhpParser/Node/Scalar/DNumberTest.php index 659fc61661..2bd31c3367 100644 --- a/test/PhpParser/Node/Scalar/DNumberTest.php +++ b/test/PhpParser/Node/Scalar/DNumberTest.php @@ -15,11 +15,11 @@ public function testRawValue(): void { $this->assertInstanceOf(Echo_::class, $echo); /** @var Echo_ $echo */ - $lLumber = $echo->exprs[0]; - $this->assertInstanceOf(Float_::class, $lLumber); + $dnumber = $echo->exprs[0]; + $this->assertInstanceOf(Float_::class, $dnumber); /** @var Float_ $dnumber */ - $this->assertSame(1234.56, $lLumber->value); - $this->assertSame('1_234.56', $lLumber->getAttribute('rawValue')); + $this->assertSame(1234.56, $dnumber->value); + $this->assertSame('1_234.56', $dnumber->getAttribute('rawValue')); } } diff --git a/test/PhpParser/Node/Scalar/NumberTest.php b/test/PhpParser/Node/Scalar/NumberTest.php index db63ec2d12..27bfe5abcc 100644 --- a/test/PhpParser/Node/Scalar/NumberTest.php +++ b/test/PhpParser/Node/Scalar/NumberTest.php @@ -14,11 +14,11 @@ public function testRawValue(): void { $this->assertInstanceOf(Echo_::class, $echo); /** @var Echo_ $echo */ - $lLumber = $echo->exprs[0]; - $this->assertInstanceOf(Int_::class, $lLumber); + $lnumber = $echo->exprs[0]; + $this->assertInstanceOf(Int_::class, $lnumber); /** @var Int_ $lnumber */ - $this->assertSame(1234, $lLumber->value); - $this->assertSame('1_234', $lLumber->getAttribute('rawValue')); + $this->assertSame(1234, $lnumber->value); + $this->assertSame('1_234', $lnumber->getAttribute('rawValue')); } }