Skip to content

Commit

Permalink
clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
solverat committed Aug 9, 2024
1 parent 22415ae commit a766f17
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/Manager/ElementMetaDataManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -217,7 +217,7 @@ public function deleteElementData(string $elementType, int $elementId, ?string $
/**
* @return array<int, ElementMetaDataInterface>
*/
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.
Expand Down
3 changes: 1 addition & 2 deletions src/Manager/ElementMetaDataManagerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace SeoBundle\Manager;

use SeoBundle\Model\ElementMetaData;
use SeoBundle\Model\ElementMetaDataInterface;

interface ElementMetaDataManagerInterface
Expand Down Expand Up @@ -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;
}
4 changes: 2 additions & 2 deletions src/Repository/ElementMetaDataRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
5 changes: 2 additions & 3 deletions src/Repository/ElementMetaDataRepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace SeoBundle\Repository;

use Doctrine\ORM\QueryBuilder;
use SeoBundle\Model\ElementMetaData;
use SeoBundle\Model\ElementMetaDataInterface;

interface ElementMetaDataRepositoryInterface
Expand All @@ -13,7 +12,7 @@ public function getQueryBuilder(): QueryBuilder;
/**
* @return array<int, ElementMetaDataInterface>
*/
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;
}

0 comments on commit a766f17

Please sign in to comment.