Changes for Scrutinizer

Two changes to fix minor problems reported by Scrutinizer.
This commit is contained in:
Owen Leibman 2020-11-27 07:16:23 -08:00
parent 1a0aab1a4f
commit 6b4feb6142
2 changed files with 5 additions and 7 deletions

View File

@ -137,12 +137,10 @@ class DefinedNameTest extends TestCase
$namedRange = $this->spreadsheet->getDefinedName('XYZ'); $namedRange = $this->spreadsheet->getDefinedName('XYZ');
self::assertInstanceOf(NamedRange::class, $namedRange); self::assertInstanceOf(NamedRange::class, $namedRange);
if ($namedRange instanceof NamedRange) { self::assertEquals('A1', $namedRange->getRange());
self::assertEquals('A1', $namedRange->getRange()); self::assertEquals('A1', $namedRange->getValue());
self::assertEquals('A1', $namedRange->getValue()); $namedRange->setRange('A2');
$namedRange->setRange('A2'); self::assertEquals('A2', $namedRange->getValue());
self::assertEquals('A2', $namedRange->getValue());
}
} }
public function testChangeWorksheet(): void public function testChangeWorksheet(): void

View File

@ -200,6 +200,6 @@ class IOFactoryTest extends TestCase
{ {
$this->expectException(\PhpOffice\PhpSpreadsheet\Reader\Exception::class); $this->expectException(\PhpOffice\PhpSpreadsheet\Reader\Exception::class);
$filename = __FILE__; $filename = __FILE__;
$reader = IOFactory::createReaderForFile($filename); IOFactory::createReaderForFile($filename);
} }
} }