| Total Complexity | 3 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | final class M extends Combinator |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @var callable |
||
| 19 | */ |
||
| 20 | private $f; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * M constructor. |
||
| 24 | 1 | * |
|
| 25 | * @psalm-param callable $f |
||
| 26 | 1 | * |
|
| 27 | 1 | * @param callable $f |
|
| 28 | */ |
||
| 29 | public function __construct(callable $f) |
||
| 30 | { |
||
| 31 | $this->f = $f; |
||
| 32 | 1 | } |
|
| 33 | |||
| 34 | 1 | /** |
|
| 35 | * @psalm-return ResultType |
||
| 36 | */ |
||
| 37 | public function __invoke() |
||
| 40 | 1 | } |
|
| 41 | |||
| 42 | /** |
||
| 43 | 1 | * @param callable $a |
|
| 44 | 1 | * |
|
| 45 | * @return Closure |
||
| 46 | */ |
||
| 47 | public static function on(callable $a) |
||
| 52 |