From a766f17e54c1d7ea2c51a433382ea27b14978a0d Mon Sep 17 00:00:00 2001 From: Stefan Hagspiel Date: Fri, 9 Aug 2024 15:13:11 +0200 Subject: [PATCH] clean-up --- src/Manager/ElementMetaDataManager.php | 4 ++-- src/Manager/ElementMetaDataManagerInterface.php | 3 +-- src/Repository/ElementMetaDataRepository.php | 4 ++-- src/Repository/ElementMetaDataRepositoryInterface.php | 5 ++--- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/Manager/ElementMetaDataManager.php b/src/Manager/ElementMetaDataManager.php index de8d402..4fad64b 100644 --- a/src/Manager/ElementMetaDataManager.php +++ b/src/Manager/ElementMetaDataManager.php @@ -199,7 +199,7 @@ public function generatePreviewDataForElement(string $elementType, int $elementI return $metaDataIntegrator->getPreviewParameter($element, $template, $data); } - public function deleteElementData(string $elementType, int $elementId, ?string $releaseType = ElementMetaData::RELEASE_TYPE_PUBLIC): void + public function deleteElementData(string $elementType, int $elementId, ?string $releaseType = ElementMetaDataInterface::RELEASE_TYPE_PUBLIC): void { $elementData = $this->elementMetaDataRepository->findAll($elementType, $elementId, $releaseType); @@ -217,7 +217,7 @@ public function deleteElementData(string $elementType, int $elementId, ?string $ /** * @return array */ - protected function checkForLegacyData(array $elements, string $elementType, int $elementId, string $releaseType = ElementMetaData::RELEASE_TYPE_PUBLIC): array + protected function checkForLegacyData(array $elements, string $elementType, int $elementId, string $releaseType = ElementMetaDataInterface::RELEASE_TYPE_PUBLIC): array { // as soon we have configured seo elements, // we'll never check the document again. It's all about performance. diff --git a/src/Manager/ElementMetaDataManagerInterface.php b/src/Manager/ElementMetaDataManagerInterface.php index 516cbbf..1127c3a 100644 --- a/src/Manager/ElementMetaDataManagerInterface.php +++ b/src/Manager/ElementMetaDataManagerInterface.php @@ -2,7 +2,6 @@ namespace SeoBundle\Manager; -use SeoBundle\Model\ElementMetaData; use SeoBundle\Model\ElementMetaDataInterface; interface ElementMetaDataManagerInterface @@ -33,5 +32,5 @@ public function saveElementData( public function generatePreviewDataForElement(string $elementType, int $elementId, string $integratorName, ?string $template, array $data): array; - public function deleteElementData(string $elementType, int $elementId, ?string $releaseType = ElementMetaData::RELEASE_TYPE_PUBLIC): void; + public function deleteElementData(string $elementType, int $elementId, ?string $releaseType = ElementMetaDataInterface::RELEASE_TYPE_PUBLIC): void; } diff --git a/src/Repository/ElementMetaDataRepository.php b/src/Repository/ElementMetaDataRepository.php index 280e69a..05dc934 100644 --- a/src/Repository/ElementMetaDataRepository.php +++ b/src/Repository/ElementMetaDataRepository.php @@ -22,7 +22,7 @@ public function getQueryBuilder(): QueryBuilder return $this->repository->createQueryBuilder('e'); } - public function findAll(string $elementType, int $elementId, ?string $releaseType = ElementMetaData::RELEASE_TYPE_PUBLIC): array + public function findAll(string $elementType, int $elementId, ?string $releaseType = ElementMetaDataInterface::RELEASE_TYPE_PUBLIC): array { $conditions = [ 'elementType' => $elementType, @@ -40,7 +40,7 @@ public function findByIntegrator( string $elementType, int $elementId, string $integrator, - string $releaseType = ElementMetaData::RELEASE_TYPE_PUBLIC + string $releaseType = ElementMetaDataInterface::RELEASE_TYPE_PUBLIC ): ?ElementMetaDataInterface { return $this->repository->findOneBy([ 'elementType' => $elementType, diff --git a/src/Repository/ElementMetaDataRepositoryInterface.php b/src/Repository/ElementMetaDataRepositoryInterface.php index 8add823..c9288eb 100644 --- a/src/Repository/ElementMetaDataRepositoryInterface.php +++ b/src/Repository/ElementMetaDataRepositoryInterface.php @@ -3,7 +3,6 @@ namespace SeoBundle\Repository; use Doctrine\ORM\QueryBuilder; -use SeoBundle\Model\ElementMetaData; use SeoBundle\Model\ElementMetaDataInterface; interface ElementMetaDataRepositoryInterface @@ -13,7 +12,7 @@ public function getQueryBuilder(): QueryBuilder; /** * @return array */ - public function findAll(string $elementType, int $elementId, ?string $releaseType = ElementMetaData::RELEASE_TYPE_PUBLIC): array; + public function findAll(string $elementType, int $elementId, ?string $releaseType = ElementMetaDataInterface::RELEASE_TYPE_PUBLIC): array; - public function findByIntegrator(string $elementType, int $elementId, string $integrator, string $releaseType = ElementMetaData::RELEASE_TYPE_PUBLIC): ?ElementMetaDataInterface; + public function findByIntegrator(string $elementType, int $elementId, string $integrator, string $releaseType = ElementMetaDataInterface::RELEASE_TYPE_PUBLIC): ?ElementMetaDataInterface; }