diff --git a/src/ZugferdDocumentBuilder.php b/src/ZugferdDocumentBuilder.php index 33b470e3..fd1dfe92 100644 --- a/src/ZugferdDocumentBuilder.php +++ b/src/ZugferdDocumentBuilder.php @@ -87,7 +87,7 @@ public function __toString() */ public static function createNew(int $profileId): ZugferdDocumentBuilder { - return (new self($profileId))->initNewDocument(); + return (new static($profileId))->initNewDocument(); } /** diff --git a/src/ZugferdDocumentReader.php b/src/ZugferdDocumentReader.php index cbdb2f52..dc64890c 100644 --- a/src/ZugferdDocumentReader.php +++ b/src/ZugferdDocumentReader.php @@ -226,7 +226,7 @@ public static function readAndGuessFromContent(string $xmlcontent): ZugferdDocum { $profileId = ZugferdProfileResolver::resolveProfileId($xmlcontent); - return (new self($profileId))->readContent($xmlcontent); + return (new static($profileId))->readContent($xmlcontent); } /** diff --git a/src/quick/ZugferdQuickDescriptor.php b/src/quick/ZugferdQuickDescriptor.php index 635b5390..e30d643f 100644 --- a/src/quick/ZugferdQuickDescriptor.php +++ b/src/quick/ZugferdQuickDescriptor.php @@ -76,7 +76,7 @@ protected static function getProfile(): int */ public static function doCreateNew(): ZugferdQuickDescriptor { - return (new self(static::getProfile())); + return static::createNew(static::getProfile()); } /**