Style and typing fixes

This commit is contained in:
MarkBaker
2023-03-29 20:05:52 +02:00
parent e10c286239
commit 7d7e616567
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ class Downloader
throw new Exception("Folder {$folder} is not accessable");
}
$filepath = "{$folder}/{$filename}";
$this->filepath = realpath($filepath);
$this->filepath = (string) realpath($filepath);
$this->filename = basename($filepath);
if ((file_exists($this->filepath) === false) || (is_readable($this->filepath) === false)) {
throw new Exception("{$this->filename} not found, or cannot be read");
+4 -1
View File
@@ -249,7 +249,10 @@ class Sample
$callTime = $callEndTime - $callStartTime;
$reflection = new ReflectionClass($writer);
$format = $reflection->getShortName();
$message = "Write {$format} format to <code>{$path}</code> in " . sprintf('%.4f', $callTime) . ' seconds';
$message = ($this->isCli() === true)
? "Write {$format} format to {$path} in " . sprintf('%.4f', $callTime) . ' seconds'
: "Write {$format} format to <code>{$path}</code> in " . sprintf('%.4f', $callTime) . ' seconds';
$this->log($message);
}