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