| 1 | <?php |
||
| 16 | final class Inject implements InjectInterface |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * If true, and the appropriate binding is not found, the Injector will skip injection of this method or field rather than produce an error. |
||
| 20 | * |
||
| 21 | * @var bool |
||
| 22 | */ |
||
| 23 | public $optional = false; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param array{optional?: bool} $values |
||
| 27 | */ |
||
| 28 | public function __construct(array $values = [], bool $optional = false) |
||
| 32 | |||
| 33 | /** |
||
| 34 | * {@inheritdoc} |
||
| 35 | */ |
||
| 36 | public function isOptional(): bool |
||
| 40 | } |
||
| 41 |