Skip to content

Commit fbab7bc

Browse files
committed
improved phpDoc
1 parent cfadb64 commit fbab7bc

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/ComponentModel/Component.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ abstract class Component implements IComponent
3737
/**
3838
* Finds the closest ancestor specified by class or interface name.
3939
* @param bool $throw throw exception if component doesn't exist?
40+
* @return ($throw is true ? IComponent : ?IComponent)
4041
*/
4142
final public function lookup(?string $type, bool $throw = true): ?IComponent
4243
{
@@ -80,6 +81,7 @@ final public function lookup(?string $type, bool $throw = true): ?IComponent
8081
/**
8182
* Finds the closest ancestor specified by class or interface name and returns backtrace path.
8283
* A path is the concatenation of component names separated by self::NAME_SEPARATOR.
84+
* @return ($throw is true ? string : ?string)
8385
*/
8486
final public function lookupPath(?string $type = null, bool $throw = true): ?string
8587
{

src/ComponentModel/Container.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ public function removeComponent(IComponent $component): void
110110
/**
111111
* Returns component specified by name or path.
112112
* @param bool $throw throw exception if component doesn't exist?
113+
* @return ($throw is true ? IComponent : ?IComponent)
113114
*/
114115
final public function getComponent(string $name, bool $throw = true): ?IComponent
115116
{

0 commit comments

Comments
 (0)