Skip to content

Commit

Permalink
Remove entity name property from PeristService so it can be used as a…
Browse files Browse the repository at this point in the history
… generic persistance class
  • Loading branch information
alex-patterson-webdev committed Jun 26, 2023
1 parent 3234e5d commit 05c7ef7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion src/Repository/EntityRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use Psr\Log\LoggerInterface;

/**
* @template Entity of EntityInterface
* @template Entity
* @implements EntityRepositoryInterface<EntityInterface>
*/
class EntityRepository implements EntityRepositoryInterface, TransactionServiceInterface
Expand Down
9 changes: 0 additions & 9 deletions src/Repository/Persistence/PersistService.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,11 @@ class PersistService implements PersistServiceInterface
* @param class-string<EntityInterface> $entityName
*/
public function __construct(
protected readonly string $entityName,
protected readonly EntityManagerInterface $entityManager,
protected readonly LoggerInterface $logger
) {
}

/**
* @return class-string<EntityInterface>
*/
public function getEntityName(): string
{
return $this->entityName;
}

/**
* @param array<string|int, mixed> $options
*
Expand Down

0 comments on commit 05c7ef7

Please sign in to comment.