Passed
Push — master ( 2236ae...d0b86a )
by Pol
11:24
created

FPT::reduce()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
ccs 0
cts 0
cp 0
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace loophp\fpt;
6
7
use Closure;
8
use loophp\fpt\Contract\FPTInterface;
9
10
/**
11
 * @psalm-immutable
12
 */
13
final class FPT implements FPTInterface
14
{
15
    /**
16
     * @psalm-pure
17
     */
18 1
    public static function compose(): Closure
19
    {
20 1
        return Compose::of();
21
    }
22
23
    /**
24
     * @psalm-pure
25
     */
26 1
    public static function curryLeft(): Closure
27
    {
28 1
        return CurryLeft::of();
29
    }
30
31
    /**
32
     * @psalm-pure
33
     */
34 1
    public static function curryRight(): Closure
35
    {
36 1
        return CurryRight::of();
37
    }
38
39
    /**
40
     * @psalm-pure
41
     */
42 1
    public static function filter(): Closure
43
    {
44 1
        return Filter::of();
45
    }
46
47
    /**
48
     * @psalm-pure
49
     */
50
    public static function flip(): Closure
51
    {
52
        return Flip::of();
53
    }
54
55
    /**
56
     * @psalm-pure
57
     */
58 1
    public static function fold(): Closure
59
    {
60 1
        return Fold::of();
61
    }
62
63
    /**
64
     * @psalm-pure
65
     */
66 1
    public static function identity(): Closure
67
    {
68 1
        return Identity::of();
69
    }
70
71
    /**
72
     * @psalm-pure
73
     */
74 1
    public static function map(): Closure
75
    {
76 1
        return Map::of();
77
    }
78
79
    /**
80
     * @psalm-pure
81
     */
82 1
    public static function nary(): Closure
83
    {
84 1
        return Nary::of();
85
    }
86
87
    /**
88
     * @psalm-pure
89
     */
90 1
    public static function not(): Closure
91
    {
92 1
        return Not::of();
93
    }
94
95
    /**
96
     * @psalm-pure
97
     */
98 1
    public static function operator(): Closure
99
    {
100 1
        return Operator::of();
101
    }
102
103
    /**
104
     * @psalm-pure
105
     */
106 1
    public static function partialLeft(): Closure
107
    {
108 1
        return PartialLeft::of();
109
    }
110
111
    /**
112
     * @psalm-pure
113
     */
114 1
    public static function partialRight(): Closure
115
    {
116 1
        return PartialRight::of();
117
    }
118
119
    /**
120
     * @psalm-pure
121
     */
122
    public static function reduce(): Closure
123
    {
124
        return Reduce::of();
125
    }
126
127
    /**
128
     * @psalm-pure
129
     */
130
    public static function thunk(): Closure
131
    {
132
        return Thunk::of();
133
    }
134
135
    /**
136
     * @psalm-pure
137
     */
138
    public static function uncurry(): Closure
139
    {
140
        return Uncurry::of();
141
    }
142
}
143