Skip to content

Commit fbb772b

Browse files
committed
Fix error message
1 parent 3cfa43c commit fbb772b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Pdf/CakePdf.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,10 +408,10 @@ public function crypto($name = null): AbstractPdfCrypto
408408

409409
$engineClassName = App::className($name, 'Pdf/Crypto', 'Crypto');
410410
if ($engineClassName === null || !class_exists($engineClassName)) {
411-
throw new Exception('Pdf crypto "%s" not found', $name);
411+
throw new Exception(sprintf('Pdf crypto `%s` not found', $name));
412412
}
413-
if (!is_subclass_of($engineClassName, 'CakePdf\Pdf\Crypto\AbstractPdfCrypto')) {
414-
throw new Exception('Crypto engine must extend "AbstractPdfCrypto"');
413+
if (!is_subclass_of($engineClassName, AbstractPdfCrypto::class)) {
414+
throw new Exception('Crypto engine must extend `AbstractPdfCrypto`');
415415
}
416416
$this->_cryptoClass = new $engineClassName($this);
417417
$this->_cryptoClass->config($config);

0 commit comments

Comments
 (0)