| Total Complexity | 2 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 10 | class Let |
||
| 11 | { |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Ctor. |
||
| 15 | * |
||
| 16 | * @param mixed $subject |
||
| 17 | * @param Closure $context |
||
| 18 | */ |
||
| 19 | public function __construct( |
||
| 20 | /** |
||
| 21 | * Element to be put into the context. |
||
| 22 | * |
||
| 23 | * @var mixed |
||
| 24 | */ |
||
| 25 | private mixed $subject, |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Context for the element. |
||
| 29 | * |
||
| 30 | * @var Closure |
||
| 31 | */ |
||
| 32 | private Closure $context |
||
| 33 | ) { |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Returns result of applying context to element. |
||
| 38 | * |
||
| 39 | * @return mixed |
||
| 40 | */ |
||
| 41 | public function value(): mixed |
||
| 44 | } |
||
| 45 | } |
||
| 46 |