Skip to content

Commit

Permalink
Fixed dependency check for fpdfWriter
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximilianKresse committed Jul 10, 2020
1 parent c525713 commit a07cd40
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Writer/FpdfWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@ class FpdfWriter extends AbstractWriter
public const WRITER_OPTION_MEASURE_UNIT = 'fpdf_measure_unit';

public function __construct()
{
}

public function writeString(QrCodeInterface $qrCode): string
{
if(!\class_exists(\FPDF::class)){
throw new \BadMethodCallException(
'The Fpdf writer requires FPDF as dependency but the class "\\FPDF" couldn\'t be found.'
);
}
}

public function writeString(QrCodeInterface $qrCode): string
{

if ($qrCode->getValidateResult()) {
throw new ValidationException(
'Built-in validation reader can not check fpdf qr codes: please disable via setValidateResult(false)'
Expand Down

0 comments on commit a07cd40

Please sign in to comment.