From fbb772bb201a4f0eaccb108470e7809ee98e869c Mon Sep 17 00:00:00 2001 From: ADmad Date: Thu, 28 May 2020 13:59:31 +0530 Subject: [PATCH] Fix error message --- src/Pdf/CakePdf.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Pdf/CakePdf.php b/src/Pdf/CakePdf.php index f3c3d9a7..e99024f1 100644 --- a/src/Pdf/CakePdf.php +++ b/src/Pdf/CakePdf.php @@ -408,10 +408,10 @@ public function crypto($name = null): AbstractPdfCrypto $engineClassName = App::className($name, 'Pdf/Crypto', 'Crypto'); if ($engineClassName === null || !class_exists($engineClassName)) { - throw new Exception('Pdf crypto "%s" not found', $name); + throw new Exception(sprintf('Pdf crypto `%s` not found', $name)); } - if (!is_subclass_of($engineClassName, 'CakePdf\Pdf\Crypto\AbstractPdfCrypto')) { - throw new Exception('Crypto engine must extend "AbstractPdfCrypto"'); + if (!is_subclass_of($engineClassName, AbstractPdfCrypto::class)) { + throw new Exception('Crypto engine must extend `AbstractPdfCrypto`'); } $this->_cryptoClass = new $engineClassName($this); $this->_cryptoClass->config($config);