Total Complexity | 2 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | #[Attribute(Attribute::TARGET_METHOD | Attribute::TARGET_PARAMETER)] |
||
18 | final class Inject implements InjectInterface |
||
19 | { |
||
20 | /** |
||
21 | * If true, and the appropriate binding is not found, the Injector will skip injection of this method or field rather than produce an error. |
||
22 | * |
||
23 | * @var bool |
||
24 | */ |
||
25 | public $optional = false; |
||
26 | |||
27 | /** |
||
28 | * @SuppressWarnings(PHPMD.BooleanArgumentFlag) |
||
29 | */ |
||
30 | public function __construct(bool $optional = false) |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | public function isOptional(): bool |
||
43 |