Skip to content

Commit

Permalink
fixup! fixup! 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 77ac190 commit fe044c1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Resolver/Location/FindParentStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

namespace Pimcore\Bundle\DataImporterBundle\Resolver\Location;

use Exception;
use Pimcore\Bundle\DataImporterBundle\Exception\InvalidConfigurationException;
use Pimcore\Bundle\DataImporterBundle\Exception\InvalidInputException;
use Pimcore\Bundle\DataImporterBundle\Tool\DataObjectLoader;
Expand Down Expand Up @@ -148,14 +149,14 @@ public function updateParent(ElementInterface $element, array $inputData): Eleme
$this->saveAsVariant
&& $element instanceof DataObject\Concrete
&& $element::class === $newParent::class
&& $element->getClass()->getAllowVariants()
&& !$element->hasChildren()
&& $element->getClass()->getAllowVariants()
) {
$element->setType(AbstractObject::OBJECT_TYPE_VARIANT);
}

return $element->setParent($newParent);
} catch (NotFoundException $e) {
} catch (Exception) {
// Exception might be thrown by $element->getClass().
}
}
Expand Down

0 comments on commit fe044c1

Please sign in to comment.