Skip to content

Commit

Permalink
Changes for Scrutinizer
Browse files Browse the repository at this point in the history
Two changes to fix minor problems reported by Scrutinizer.
  • Loading branch information
oleibman authored and Gianluca Giovinazzo committed Dec 14, 2020
1 parent bcf8fb3 commit 2d1375e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions tests/PhpSpreadsheetTests/DefinedNameTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,10 @@ public function testSetAndGetRange(): void

$namedRange = $this->spreadsheet->getDefinedName('XYZ');
self::assertInstanceOf(NamedRange::class, $namedRange);
if ($namedRange instanceof NamedRange) {
self::assertEquals('A1', $namedRange->getRange());
self::assertEquals('A1', $namedRange->getValue());
$namedRange->setRange('A2');
self::assertEquals('A2', $namedRange->getValue());
}
self::assertEquals('A1', $namedRange->getRange());
self::assertEquals('A1', $namedRange->getValue());
$namedRange->setRange('A2');
self::assertEquals('A2', $namedRange->getValue());
}

public function testChangeWorksheet(): void
Expand Down
2 changes: 1 addition & 1 deletion tests/PhpSpreadsheetTests/IOFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,6 @@ public function testCreateReaderNotSpreadsheet(): void
{
$this->expectException(\PhpOffice\PhpSpreadsheet\Reader\Exception::class);
$filename = __FILE__;
$reader = IOFactory::createReaderForFile($filename);
IOFactory::createReaderForFile($filename);
}
}

0 comments on commit 2d1375e

Please sign in to comment.