Skip to content

Commit

Permalink
Use class-string type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette committed Jan 23, 2024
1 parent b76da3c commit 409d77b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/Support/ClassRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ abstract public function all(): array;
/**
* Returns the same list as all, but as a list of class names.
*
* @return string[] A list class FQN.
* @return class-string[] A list class FQN.
*/
public function list(): array
{
Expand All @@ -49,7 +49,7 @@ public function list(): array
/**
* Return the requested class instance from the repository.
*
* @param string $class Class FQN.
* @param class-string $class Class FQN.
*
* @return T
*/
Expand All @@ -69,7 +69,7 @@ public function get(string $class): object
/**
* Validate if a specific class exist.
*
* @param string $class Class FQN.
* @param class-string $class Class FQN.
*
* @return bool
*/
Expand Down
6 changes: 3 additions & 3 deletions src/Support/ClassRepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ public function all(): array;
/**
* Returns the same list as all, but as a list of class names.
*
* @return string[] A list class FQN.
* @return class-string[] A list class FQN.
*/
public function list(): array;

/**
* Return the requested class instance from the repository.
*
* @param string $class Class FQN.
* @param class-string $class Class FQN.
*
* @return T
*/
Expand All @@ -50,7 +50,7 @@ public function get(string $class): object;
/**
* Validate if a specific class exist.
*
* @param string $class Class FQN.
* @param class-string $class Class FQN.
*
* @return bool
*/
Expand Down

0 comments on commit 409d77b

Please sign in to comment.