From 14860813394c978881c54bfec84d9b418ed8de70 Mon Sep 17 00:00:00 2001 From: Maximilian Kresse <545671+MaximilianKresse@users.noreply.github.com> Date: Tue, 6 Aug 2024 09:55:43 +0200 Subject: [PATCH] Fixed code styling --- src/GraphicsState.php | 4 ++-- src/PdfParser/Type/PdfDictionary.php | 6 +++--- src/PdfParser/Type/PdfStream.php | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/GraphicsState.php b/src/GraphicsState.php index 6d253a6..f8da2b1 100644 --- a/src/GraphicsState.php +++ b/src/GraphicsState.php @@ -31,8 +31,8 @@ public function __construct($ctm = null) if ($ctm === null) { $ctm = new Matrix(); } elseif (!($ctm instanceof Matrix)) { - throw new \InvalidArgumentException('$ctm must be an instance of Fpdi\\Matrix or null'); - } + throw new \InvalidArgumentException('$ctm must be an instance of Fpdi\\Matrix or null'); + } $this->ctm = $ctm; } diff --git a/src/PdfParser/Type/PdfDictionary.php b/src/PdfParser/Type/PdfDictionary.php index fcf4c7f..9859afc 100644 --- a/src/PdfParser/Type/PdfDictionary.php +++ b/src/PdfParser/Type/PdfDictionary.php @@ -109,9 +109,9 @@ public static function create(array $entries = []) */ public static function get($dictionary, $key, $default = null) { - if ($default !== null && !($default instanceof PdfType)) { - throw new \InvalidArgumentException('Default value must be an instance of PdfType or null'); - } + if ($default !== null && !($default instanceof PdfType)) { + throw new \InvalidArgumentException('Default value must be an instance of PdfType or null'); + } $dictionary = self::ensure($dictionary); if (isset($dictionary->value[$key])) { diff --git a/src/PdfParser/Type/PdfStream.php b/src/PdfParser/Type/PdfStream.php index b37c272..a23fd0d 100644 --- a/src/PdfParser/Type/PdfStream.php +++ b/src/PdfParser/Type/PdfStream.php @@ -37,9 +37,9 @@ class PdfStream extends PdfType */ public static function parse(PdfDictionary $dictionary, StreamReader $reader, $parser = null) { - if ($parser !== null && !($parser instanceof PdfParser)) { - throw new \InvalidArgumentException('$parser must be an instance of PdfParser or null'); - } + if ($parser !== null && !($parser instanceof PdfParser)) { + throw new \InvalidArgumentException('$parser must be an instance of PdfParser or null'); + } $v = new self(); $v->value = $dictionary; $v->reader = $reader;