Completed
Push — master ( b03e32...44190a )
by Sérgio
03:19
created

gt.php ➔ greater_than()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 6
ccs 0
cts 2
cp 0
crap 2
rs 9.4285
1
<?php
2
3
namespace Sergiors\Functional;
4
5
/**
6
 * @author Sérgio Rafael Siqueira <[email protected]>
7
 *
8
 * @return mixed
9
 */
10
function gt()
11
{
12 1
    $args = func_get_args();
13
14
    $gt = function ($x, $y) {
15 1
        return $x > $y;
16 1
    };
17
18 1
    return call_user_func_array(curry($gt), $args);
19
}
20
21
/**
22
 * Just an alias.
23
 */
24
function greater_than()
25
{
26
    $args = func_get_args();
27
28
    return call_user_func_array(__NAMESPACE__.'\greater_than', $args);
29
}
30