Jelajahi Sumber

:octocat: use QRCodeException & ignore coverage for lib check

codemasher 5 tahun lalu
induk
melakukan
be8e143e03
1 mengubah file dengan 4 tambahan dan 2 penghapusan
  1. 4 2
      src/Output/QRFpdf.php

+ 4 - 2
src/Output/QRFpdf.php

@@ -14,8 +14,8 @@
 
 
 namespace chillerlan\QRCode\Output;
 namespace chillerlan\QRCode\Output;
 
 
-use BadMethodCallException;
 use chillerlan\QRCode\Data\QRMatrix;
 use chillerlan\QRCode\Data\QRMatrix;
+use chillerlan\QRCode\QRCodeException;
 use chillerlan\Settings\SettingsContainerInterface;
 use chillerlan\Settings\SettingsContainerInterface;
 use FPDF;
 use FPDF;
 
 
@@ -32,9 +32,11 @@ class QRFpdf extends QROutputAbstract{
 	public function __construct(SettingsContainerInterface $options, QRMatrix $matrix){
 	public function __construct(SettingsContainerInterface $options, QRMatrix $matrix){
 
 
 		if(!class_exists(FPDF::class)){
 		if(!class_exists(FPDF::class)){
-			throw new BadMethodCallException(
+			// @codeCoverageIgnoreStart
+			throw new QRCodeException(
 				'The QRFpdf output requires FPDF as dependency but the class "\FPDF" couldn\'t be found.'
 				'The QRFpdf output requires FPDF as dependency but the class "\FPDF" couldn\'t be found.'
 			);
 			);
+			// @codeCoverageIgnoreEnd
 		}
 		}
 
 
 		parent::__construct($options, $matrix);
 		parent::__construct($options, $matrix);