Issues (345)

Security Analysis    no request data  

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

src/operators.php (34 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php namespace Tarsana\Functional;
2
3
/**
4
 * This file contains operators as functions.
5
 * @file
6
 */
7
8
/**
9
 * Returns `$a && $b`.
10
 *
11
 * ```php
12
 * $isTrue = F\and_(true);
13
 * $isTrue(false); //=> false
14
 * $isTrue(true); //=> true
15
 * ```
16
 *
17
 * @stream
18
 * @signature Boolean -> Boolean -> Boolean
19
 * @param  bool $a
0 ignored issues
show
There is no parameter named $a. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
20
 * @param  bool $b
0 ignored issues
show
There is no parameter named $b. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
21
 * @return bool
22
 */
23 View Code Duplication
function and_() {
0 ignored issues
show
This function seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
24
    static $and = false;
25
    $and = $and ?: curry(function($a, $b){
26
        return $a && $b;
27
    });
28
    return _apply($and, func_get_args());
29
}
30
31
/**
32
 * Returns `$a || $b`.
33
 *
34
 * ```php
35
 * $isTrue = F\or_(false);
36
 * $isTrue(false); //=> false
37
 * $isTrue(true); //=> true
38
 * ```
39
 *
40
 * @stream
41
 * @signature Boolean -> Boolean -> Boolean
42
 * @param  bool $a
0 ignored issues
show
There is no parameter named $a. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
43
 * @param  bool $b
0 ignored issues
show
There is no parameter named $b. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
44
 * @return bool
45
 */
46 View Code Duplication
function or_() {
0 ignored issues
show
This function seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
47
    static $or = false;
48
    $or = $or ?: curry(function($a, $b){
49
        return $a || $b;
50
    });
51
    return _apply($or, func_get_args());
52
}
53
54
/**
55
 * Returns `!$x`.
56
 *
57
 * ```php
58
 * F\map(F\not(), [true, false, true]); //=> [false, true, false]
59
 * ```
60
 *
61
 * @stream
62
 * @signature Boolean -> Boolean
63
 * @param  bool $x
0 ignored issues
show
There is no parameter named $x. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
64
 * @return bool
65
 */
66 View Code Duplication
function not() {
0 ignored issues
show
This function seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
67
    static $not = false;
68
    $not = $not ?: curry(function($x) {
69
        return !$x;
70
    });
71
    return _apply($not, func_get_args());
72
}
73
74
/**
75
 * Returns `$x == $y`.
76
 *
77
 * ```php
78
 * F\eq('10', 10); //=> true
79
 * ```
80
 *
81
 * @stream
82
 * @signature * -> * -> Boolean
83
 * @param  mixed $a
0 ignored issues
show
There is no parameter named $a. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
84
 * @param  mixed $b
0 ignored issues
show
There is no parameter named $b. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
85
 * @return bool
86
 */
87
function eq() {
88
    $eq = curry(function($a, $b){
89
        return $a == $b;
90
    });
91
    return _apply($eq, func_get_args());
92
}
93
94
/**
95
 * Returns `$x != $y`.
96
 *
97
 * ```php
98
 * F\notEq('Hi', 'Hello'); //=> true
99
 * ```
100
 *
101
 * @stream
102
 * @signature * -> * -> Boolean
103
 * @param  mixed $a
0 ignored issues
show
There is no parameter named $a. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
104
 * @param  mixed $b
0 ignored issues
show
There is no parameter named $b. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
105
 * @return bool
106
 */
107 View Code Duplication
function notEq() {
0 ignored issues
show
This function seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
108
    static $notEq = false;
109
    $notEq = $notEq ?: curry(function($a, $b){
110
        return $a != $b;
111
    });
112
    return _apply($notEq, func_get_args());
113
}
114
115
/**
116
 * Returns `$x === $y`.
117
 *
118
 * ```php
119
 * F\eqq(10, '10'); //=> false
120
 * ```
121
 * @stream
122
 * @signature * -> * -> Boolean
123
 * @param  mixed $a
0 ignored issues
show
There is no parameter named $a. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
124
 * @param  mixed $b
0 ignored issues
show
There is no parameter named $b. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
125
 * @return bool
126
 */
127 View Code Duplication
function eqq() {
0 ignored issues
show
This function seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
128
    static $eqq = false;
129
    $eqq = $eqq ?: curry(function($a, $b){
130
        return $a === $b;
131
    });
132
    return _apply($eqq, func_get_args());
133
}
134
135
/**
136
 * Returns `$x !== $y`.
137
 *
138
 * ```php
139
 * F\notEqq(10, '10'); //=> true
140
 * ```
141
 *
142
 * @stream
143
 * @signature * -> * -> Boolean
144
 * @param  mixed $a
0 ignored issues
show
There is no parameter named $a. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
145
 * @param  mixed $b
0 ignored issues
show
There is no parameter named $b. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
146
 * @return bool
147
 */
148 View Code Duplication
function notEqq() {
0 ignored issues
show
This function seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
149
    static $notEqq = false;
150
    $notEqq = $notEqq ?: curry(function($a, $b){
151
        return $a !== $b;
152
    });
153
    return _apply($notEqq, func_get_args());
154
}
155
156
/**
157
 * Returns `true` if the two elements have the same type and are deeply equivalent.
158
 *
159
 * ```php
160
 * $a = (object) ['a' => 1, 'b' => (object) ['c' => 'Hello'], 'd' => false];
161
 * $b = (object) ['a' => 1, 'b' => (object) ['c' => 'Hi'], 'd' => false];
162
 * $c = (object) ['a' => 1, 'b' => ['c' => 'Hello'], 'd' => false];
163
 * // should have the same type
164
 * F\equals(5, '5'); //=> false
165
 * F\equals([1, 2, 3], [1, 2, 3]); //=> true
166
 * // should have the same order
167
 * F\equals([1, 3, 2], [1, 2, 3]); //=> false
168
 * F\equals($a, $b); //=> false
169
 * F\equals($a, $c); //=> false
170
 * $b->b->c = 'Hello';
171
 * F\equals($a, $b); //=> true
172
 * ```
173
 *
174
 * @stream
175
 * @signature * -> * -> Boolean
176
 * @param  mixed $a
0 ignored issues
show
There is no parameter named $a. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
177
 * @param  mixed $b
0 ignored issues
show
There is no parameter named $b. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
178
 * @return bool
179
 */
180
function equals() {
181
    static $equals = false;
182
    $equals = $equals ?: curry(_f('_equals'));
183
    return _apply($equals, func_get_args());
184
}
185
function _equals($a, $b) {
186
    $type = type($a);
187
    if ($type != type($b))
188
        return false;
189
    switch ($type) {
190
        case 'List':
191
            $length = count($a);
192
            if (count($b) != $length)
193
                return false;
194
            $index = 0;
195
            while ($index < $length) {
196
                if (!_equals($a[$index], $b[$index]))
197
                    return false;
198
                $index ++;
199
            }
200
            return true;
201
        case 'Array':
202
        case 'ArrayObject':
203
        case 'Object':
204
            $keysA = keys($a);
205
            $keysB = keys($b);
206
            $length = count($keysA);
207
            if (count($keysB) != $length)
208
                return false;
209
            $index = 0;
210
            while ($index < $length) {
211
                if (!_equals($keysA[$index], $keysB[$index]))
212
                    return false;
213
                if (!_equals(get($keysA[$index], $a), get($keysB[$index], $b)))
214
                    return false;
215
                $index ++;
216
            }
217
            return true;
218
        default:
219
            return $a == $b;
220
    }
221
}
222
223
/**
224
 * Returns `true` if the results of applying `$fn` to `$a` and `$b` are deeply equal.
225
 *
226
 * ```php
227
 * $headEquals = F\equalBy(F\head());
228
 * $headEquals([1, 2], [1, 3]); //=> true
229
 * $headEquals([3, 2], [1, 3]); //=> false
230
 *
231
 * $sameAge = F\equalBy(F\get('age'));
232
 * $foo = ['name' => 'foo', 'age' => 11];
233
 * $bar = ['name' => 'bar', 'age' => 13];
234
 * $baz = ['name' => 'baz', 'age' => 11];
235
 * $sameAge($foo, $bar); //=> false
236
 * $sameAge($foo, $baz); //=> true
237
 * ```
238
 *
239
 * @stream
240
 * @signature (a -> b) -> a -> a -> Boolean
241
 * @return [type] [description]
0 ignored issues
show
The doc-type [type] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
242
 */
243
function equalBy() {
244
    static $equalBy = false;
245
    $equalBy = $equalBy ?: curry(function($fn, $a, $b) {
246
        return _equals($fn($a), $fn($b));
247
    });
248
    return _apply($equalBy, func_get_args());
249
}
250
251
/**
252
 * Returns `$a < $b`.
253
 *
254
 * ```php
255
 * F\lt(3, 5); //=> true
256
 * F\lt(5, 5); //=> false
257
 * ```
258
 *
259
 * @stream
260
 * @signature * -> * -> Boolean
261
 * @param  mixed $a
0 ignored issues
show
There is no parameter named $a. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
262
 * @param  mixed $b
0 ignored issues
show
There is no parameter named $b. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
263
 * @return bool
264
 */
265 View Code Duplication
function lt() {
0 ignored issues
show
This function seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
266
    static $lt = false;
267
    $lt = $lt ?: curry(function($a, $b){
268
        return $a < $b;
269
    });
270
    return _apply($lt, func_get_args());
271
}
272
273
/**
274
 * Returns `$a <= $b`.
275
 *
276
 * ```php
277
 * F\lte(3, 5); //=> true
278
 * F\lte(5, 5); //=> true
279
 * ```
280
 *
281
 * @stream
282
 * @signature * -> * -> Boolean
283
 * @param  mixed $a
0 ignored issues
show
There is no parameter named $a. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
284
 * @param  mixed $b
0 ignored issues
show
There is no parameter named $b. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
285
 * @return bool
286
 */
287 View Code Duplication
function lte() {
0 ignored issues
show
This function seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
288
    static $lte = false;
289
    $lte = $lte ?: curry(function($a, $b){
290
        return $a <= $b;
291
    });
292
    return _apply($lte, func_get_args());
293
}
294
295
/**
296
 * Returns `$a > $b`.
297
 *
298
 * ```php
299
 * F\gt(5, 3); //=> true
300
 * F\gt(5, 5); //=> false
301
 * ```
302
 *
303
 * @stream
304
 * @signature * -> * -> Boolean
305
 * @param  mixed $a
0 ignored issues
show
There is no parameter named $a. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
306
 * @param  mixed $b
0 ignored issues
show
There is no parameter named $b. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
307
 * @return bool
308
 */
309 View Code Duplication
function gt() {
0 ignored issues
show
This function seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
310
    static $gt = false;
311
    $gt = $gt ?: curry(function($a, $b){
312
        return $a > $b;
313
    });
314
    return _apply($gt, func_get_args());
315
}
316
317
/**
318
 * Returns `$a >= $b`.
319
 *
320
 * ```php
321
 * F\gte(5, 3); //=> true
322
 * F\gte(5, 5); //=> true
323
 * ```
324
 *
325
 * @stream
326
 * @signature * -> * -> Boolean
327
 * @param  mixed $a
0 ignored issues
show
There is no parameter named $a. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
328
 * @param  mixed $b
0 ignored issues
show
There is no parameter named $b. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
329
 * @return bool
330
 */
331 View Code Duplication
function gte() {
0 ignored issues
show
This function seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
332
    static $gte = false;
333
    $gte = $gte ?: curry(function($a, $b){
334
        return $a >= $b;
335
    });
336
    return _apply($gte, func_get_args());
337
}
338
339