Skip to content

Commit 3e882f0

Browse files
committed
Ran php-cs-fixer
1 parent d7f3f49 commit 3e882f0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/PhpWord/Shared/XMLReader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function getDomFromZip($zipFile, $xmlFile)
6262

6363
$zip = new ZipArchive();
6464
$openStatus = $zip->open($zipFile);
65-
if($openStatus !== true){
65+
if ($openStatus !== true) {
6666
/**
6767
* Throw an exception since making further calls on the ZipArchive would cause a fatal error.
6868
* This prevents fatal errors on corrupt archives and attempts to open old "doc" files.

tests/PhpWordTests/Shared/XMLReaderTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,18 +93,18 @@ public function testThrowsExceptionOnZipArchiveOpenErrors(): void
9393
$tempPath = tempnam(sys_get_temp_dir(), 'PhpWord');
9494

9595
// Simulate a corrupt archive
96-
file_put_contents($tempPath, rand());
96+
file_put_contents($tempPath, mt_rand());
9797

9898
$exceptionMessage = null;
99-
try{
99+
100+
try {
100101
$reader = new XMLReader();
101102
$reader->getDomFromZip($tempPath, 'test.xml');
102-
}
103-
catch(\Exception $e){
103+
} catch (Exception $e) {
104104
$exceptionMessage = $e->getMessage();
105105
}
106106

107-
$this->assertNotNull($exceptionMessage);
107+
self::assertNotNull($exceptionMessage);
108108

109109
unlink($tempPath);
110110
}

0 commit comments

Comments
 (0)