FPT::wrap()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

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
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
/**
4
 * For the full copyright and license information, please view
5
 * the LICENSE file that was distributed with this source code.
6
 */
7
8
declare(strict_types=1);
9
10
namespace loophp\fpt;
11
12
use Closure;
13
use loophp\fpt\Contract\FPTInterface;
14
15
/**
16
 * @psalm-immutable
17
 */
18
final class FPT implements FPTInterface
19
{
20
    /**
21
     * @pure
22
     */
23 1
    public static function arg(): Closure
24
    {
25 1
        return Arg::of();
26
    }
27
28
    /**
29
     * @pure
30
     */
31 1
    public static function args(): Closure
32
    {
33 1
        return Args::of();
34
    }
35
36
    /**
37
     * @pure
38
     */
39 1
    public static function compose(): Closure
40
    {
41 1
        return Compose::of();
42
    }
43
44
    /**
45
     * @pure
46
     */
47 1
    public static function current(): Closure
48
    {
49 1
        return Current::of();
50
    }
51
52
    /**
53
     * @pure
54
     */
55 1
    public static function curry(): Closure
56
    {
57 1
        return Curry::of();
58
    }
59
60
    /**
61
     * @pure
62
     */
63 1
    public static function end(): Closure
64
    {
65 1
        return End::of();
66
    }
67
68
    /**
69
     * @pure
70
     */
71 3
    public static function filter(): Closure
72
    {
73 3
        return Filter::of();
74
    }
75
76
    /**
77
     * @pure
78
     */
79 1
    public static function flip(): Closure
80
    {
81 1
        return Flip::of();
82
    }
83
84
    /**
85
     * @pure
86
     */
87 1
    public static function fold(): Closure
88
    {
89 1
        return Fold::of();
90
    }
91
92
    /**
93
     * @pure
94
     *
95 1
     * @template T
96
     *
97 1
     * @return Closure(T): T
98
     */
99
    public static function identity(): Closure
100
    {
101
        return Identity::of();
102
    }
103
104
    /**
105
     * @pure
106
     *
107 1
     * @template TKey
108
     * @template T
109 1
     * @template U
110
     *
111
     * @return Closure(callable(T, TKey, iterable<TKey, T>): U)
112
     */
113
    public static function map(): Closure
114
    {
115
        return Map::of();
116
    }
117
118
    /**
119
     * @pure
120
     */
121 1
    public static function nary(): Closure
122
    {
123 1
        return Nary::of();
124
    }
125
126
    /**
127
     * @pure
128
     *
129 1
     * @template T
130
     * @template U
131 1
     *
132
     * @return Closure(callable(T...): U): Closure(mixed): bool
133
     */
134
    public static function not(): Closure
135
    {
136
        return Not::of();
137
    }
138
139
    /**
140
     * @pure
141
     */
142 1
    public static function operator(): Closure
143
    {
144 1
        return Operator::of();
145
    }
146
147
    /**
148
     * @pure
149
     */
150 1
    public static function reduce(): Closure
151
    {
152 1
        return Reduce::of();
153
    }
154
155
    /**
156
     * @pure
157
     */
158 1
    public static function reduction(): Closure
159
    {
160 1
        return Reduction::of();
161
    }
162
163
    /**
164
     * @pure
165
     */
166 1
    public static function thunk(): Closure
167
    {
168 1
        return Thunk::of();
169
    }
170
171
    /**
172
     * @pure
173
     */
174 1
    public static function uncurry(): Closure
175
    {
176 1
        return Uncurry::of();
177
    }
178
179
    /**
180
     * @pure
181
     */
182 2
    public static function wrap(): Closure
183
    {
184 2
        return Wrap::of();
185
    }
186
}
187