Skip to content

Commit

Permalink
improved phpDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Dec 11, 2023
1 parent adf4750 commit 7d8abf1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/DI/Autowiring.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public function __construct(ContainerBuilder $builder)
/**
* Resolves service name by type.
* @param bool $throw exception if service not found?
* @return ($throw is true ? string : ?string)
* @throws MissingServiceException when not found
* @throws ServiceCreationException when multiple found
*/
Expand Down
2 changes: 1 addition & 1 deletion src/DI/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public function createService(string $name, array $args = []): object
* Resolves service by type.
* @template T of object
* @param class-string<T> $type
* @return ?T
* @return ($throw is true ? T : ?T)
* @throws MissingServiceException
*/
public function getByType(string $type, bool $throw = true): ?object
Expand Down
1 change: 1 addition & 0 deletions src/DI/ContainerBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ public function addExcludedClasses(array $types)
/**
* Resolves autowired service name by type.
* @param bool $throw exception if service doesn't exist?
* @return ($throw is true ? string : ?string)
* @throws MissingServiceException
*/
public function getByType(string $type, bool $throw = false): ?string
Expand Down

0 comments on commit 7d8abf1

Please sign in to comment.