for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Sunspikes\ClamavValidator;
use Exception;
class ClamavValidatorException extends Exception
{
/**
* @param string $file
*/
public static function forNonReadableFile($file)
return new self(
sprintf('The file "%s" is not readable', $file)
);
}
* @param array $result
public static function forScanResult($result)
sprintf(
'ClamAV scanner failed to scan file "%s" with error "%s" (%s)',
$result['filename'],
$result['reason'],
$result['status']
)
* @param \Exception $exception
public static function forClientException($exception)
sprintf('ClamAV scanner client failed with error "%s"', $exception->getMessage()),
0,
$exception