Completed
Pull Request — master (#7)
by Siwapun
04:49 queued 03:16
created

gte()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
namespace Aerophant\Ramda;
3
4
/**
5
 * @param int $index
6
 * @param array $array
7
 * @return mixed
8
 */
9
function equals()
10
{
11
  $equals = function ($a, $b) {
12
    return $a == $b;
13
  };
14
  $arguments = func_get_args();
15
  $curried = curryN($equals, 2);
16
  return call_user_func_array($curried, $arguments);
17
}
18
19
function gt()
20
{
21
  $gt = function ($a, $b) {
22
    return $a > $b;
23
  };
24
  $arguments = func_get_args();
25
  $curried = curryN($gt, 2);
26
  return call_user_func_array($curried, $arguments);
27
}
28
29
function gte()
30
{
31
  $gte = function ($a, $b) {
32
    return $a >= $b;
33
  };
34
  $arguments = func_get_args();
35
  $curried = curryN($gte, 2);
36
  return call_user_func_array($curried, $arguments);
37
}
38
39
function lt()
40
{
41
  $lt = function ($a, $b) {
42
    return $a < $b;
43
  };
44
  $arguments = func_get_args();
45
  $curried = curryN($lt, 2);
46
  return call_user_func_array($curried, $arguments);
47
}
48
49
function lte()
50
{
51
  $lte = function ($a, $b) {
52
    return $a <= $b;
53
  };
54
  $arguments = func_get_args();
55
  $curried = curryN($lte, 2);
56
  return call_user_func_array($curried, $arguments);
57
}
58