Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed "of object" from docBlock in "Cycle\ORM\RepositoryInterface" #508

Merged
merged 2 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/FactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ public function loader(
): LoaderInterface;

/**
* @template TEntity
*
* Create repository associated with given role.
*
* @param non-empty-string|class-string<TEntity> $role
* @return ($role is class-string<TEntity> ? RepositoryInterface<TEntity> : RepositoryInterface<object>)
*/
public function repository(
ORMInterface $orm,
Expand Down
2 changes: 1 addition & 1 deletion src/RepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* Defines ability to locate entities based on scope parameters.
*
* @template TEntity of object
* @template TEntity
*/
interface RepositoryInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Service/Implementation/RepositoryProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
final class RepositoryProvider implements RepositoryProviderInterface
{
/** @var array<non-empty-string, RepositoryInterface> */
/** @var array<non-empty-string, RepositoryInterface<object>> */
private array $repositories = [];

public function __construct(
Expand Down
5 changes: 4 additions & 1 deletion src/Service/RepositoryProviderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
interface RepositoryProviderInterface
{
/**
* @template TEntity of object
*
* Get repository associated with given entity role.
*
* @param non-empty-string $entity
* @param class-string<TEntity>|non-empty-string $entity
* @return ($entity is class-string<TEntity> ? RepositoryInterface<TEntity> : RepositoryInterface<object>)
*/
public function getRepository(string $entity): RepositoryInterface;
}
Loading