Skip to content

Commit

Permalink
#25 Centralisation of profile recognition -> Fix self vs. static
Browse files Browse the repository at this point in the history
  • Loading branch information
HorstOeko committed Oct 12, 2023
1 parent ebb3357 commit d1cdb21
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ZugferdDocumentBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function __toString()
*/
public static function createNew(int $profileId): ZugferdDocumentBuilder
{
return (new self($profileId))->initNewDocument();
return (new static($profileId))->initNewDocument();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/ZugferdDocumentReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/quick/ZugferdQuickDescriptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ protected static function getProfile(): int
*/
public static function doCreateNew(): ZugferdQuickDescriptor
{
return (new self(static::getProfile()));
return static::createNew(static::getProfile());
}

/**
Expand Down

0 comments on commit d1cdb21

Please sign in to comment.