Skip to content

Commit

Permalink
fixup! Addressed some qodana warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
turbo-ele committed Jan 31, 2024
1 parent 1a3ab14 commit facb490
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Resolver/Resolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@ public function loadOrCreateAndPrepareElement(array $inputData, bool $createNew
$this->getLocationUpdateStrategy()->updateParent($element, $inputData);

// The parent of a variant cannot be changed anymore.
if ($oldParentId !== $element->getParentId() && $element->getType() === AbstractObject::OBJECT_TYPE_VARIANT) {
if (
$oldParentId !== $element->getParentId()
&& $element->getType() === AbstractObject::OBJECT_TYPE_VARIANT
) {
throw new InvalidInputException(
"Element with id `{$element->getId()}` is a variant and cannot change its parent anymore"
);
Expand Down

0 comments on commit facb490

Please sign in to comment.