Skip to content

Commit

Permalink
Tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
nfourtythree committed Nov 14, 2024
1 parent 9010336 commit ba07f0a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/elements/Variant.php
Original file line number Diff line number Diff line change
Expand Up @@ -524,8 +524,9 @@ public function setOwner(?ElementInterface $owner): void

/**
* @inheritdoc
* @TODO remove implementation when `NestedElementTrait::getOwner()` is updated
*/
public function getPrimaryOwner(): ?ElementInterface
public function getPrimaryOwner(): ?Product
{
if (!isset($this->_primaryOwner)) {
$primaryOwnerId = $this->getPrimaryOwnerId();
Expand All @@ -541,13 +542,15 @@ public function getPrimaryOwner(): ?ElementInterface
}
}

/** @phpstan-ignore-next-line */
return $this->_primaryOwner ?: null;
}

/**
* @inheritdoc
* @TODO remove implementation when `NestedElementTrait::getOwner()` is updated
*/
public function getOwner(): ?ElementInterface
public function getOwner(): ?Product
{
if (!isset($this->_owner)) {
$ownerId = $this->getOwnerId();
Expand All @@ -568,6 +571,7 @@ public function getOwner(): ?ElementInterface
}
}

/** @phpstan-ignore-next-line */
return $this->_owner ?: null;
}

Expand Down

0 comments on commit ba07f0a

Please sign in to comment.