Total Complexity | 3 |
Total Lines | 53 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | final class V extends Combinator |
||
18 | { |
||
19 | /** |
||
20 | * @var callable |
||
21 | */ |
||
22 | private $f; |
||
23 | |||
24 | /** |
||
25 | * @var mixed |
||
26 | */ |
||
27 | private $x; |
||
28 | |||
29 | /** |
||
30 | * @var mixed |
||
31 | */ |
||
32 | private $y; |
||
33 | |||
34 | /** |
||
35 | * V constructor. |
||
36 | * |
||
37 | * @psalm-param AType $x |
||
38 | * @psalm-param BType $y |
||
39 | * @psalm-param callable(AType): callable(BType): CType $f |
||
40 | * |
||
41 | * @param mixed $x |
||
42 | * @param mixed $y |
||
43 | * @param callable $f |
||
44 | */ |
||
45 | 1 | public function __construct($x, $y, callable $f) |
|
46 | { |
||
47 | 1 | $this->f = $f; |
|
48 | 1 | $this->x = $x; |
|
49 | 1 | $this->y = $y; |
|
50 | 1 | } |
|
51 | |||
52 | /** |
||
53 | * @psalm-return CType |
||
54 | */ |
||
55 | 1 | public function __invoke() |
|
58 | } |
||
59 | |||
60 | /** |
||
61 | * @param callable $a |
||
62 | * |
||
63 | * @return Closure |
||
64 | */ |
||
65 | 1 | public static function on($a): Closure |
|
74 |