Skip to content

Commit 0b36ac1

Browse files
committed
Update method return types
1 parent f15969c commit 0b36ac1

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/ClamAV.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,12 +190,14 @@ public function getFailedToScanFileList(): SS_List
190190
public function isOffline(): bool
191191
{
192192
if ($this->_cache_isOffline !== null) {
193-
return $this->_cache_isOffline;
193+
return (bool)$this->_cache_isOffline;
194194
}
195195
$result = $this->version();
196196
$result = ($result === ClamAV::OFFLINE);
197197

198-
return $this->_cache_isOffline = $result;
198+
$this->_cache_isOffline = $result;
199+
200+
return (bool)$this->_cache_isOffline;
199201
}
200202

201203
public function version(): bool|string

src/ClamAVEmulator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class ClamAVEmulator extends ClamAV
3838
/**
3939
* {@inheritDoc}
4040
*/
41-
public function version(): string
41+
public function version(): bool|string
4242
{
4343
$mode = Config::inst()->get(__CLASS__, 'mode');
4444
$emulateVersion = Config::inst()->get(__CLASS__, 'emulate_version');

src/Model/ClamAVScan.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ public function getRawData(): array
513513
$value = json_decode($value, true);
514514
}
515515

516-
return $value;
516+
return (array)$value;
517517
}
518518

519519
/**

0 commit comments

Comments
 (0)