Skip to content

Commit 7d7e616

Browse files
committed
Style and typing fixes
1 parent e10c286 commit 7d7e616

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/PhpSpreadsheet/Helper/Downloader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function __construct(string $folder, string $filename, ?string $filetype
2626
throw new Exception("Folder {$folder} is not accessable");
2727
}
2828
$filepath = "{$folder}/{$filename}";
29-
$this->filepath = realpath($filepath);
29+
$this->filepath = (string) realpath($filepath);
3030
$this->filename = basename($filepath);
3131
if ((file_exists($this->filepath) === false) || (is_readable($this->filepath) === false)) {
3232
throw new Exception("{$this->filename} not found, or cannot be read");

src/PhpSpreadsheet/Helper/Sample.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,10 @@ public function logWrite(IWriter $writer, $path, $callStartTime): void
249249
$callTime = $callEndTime - $callStartTime;
250250
$reflection = new ReflectionClass($writer);
251251
$format = $reflection->getShortName();
252-
$message = "Write {$format} format to <code>{$path}</code> in " . sprintf('%.4f', $callTime) . ' seconds';
252+
253+
$message = ($this->isCli() === true)
254+
? "Write {$format} format to {$path} in " . sprintf('%.4f', $callTime) . ' seconds'
255+
: "Write {$format} format to <code>{$path}</code> in " . sprintf('%.4f', $callTime) . ' seconds';
253256

254257
$this->log($message);
255258
}

0 commit comments

Comments
 (0)