GreaterThan::reverse()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * @copyright Copyright (c) 2013-2017 2amigOS! Consulting Group LLC
4
 * @link http://2amigos.us
5
 * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
6
 */
7
namespace dosamigos\arrayquery\conditions;
8
9
/**
10
 * GreaterThan checks if value is greater than the data searched.
11
 *
12
 * @author Antonio Ramirez <[email protected]>
13
 * @link http://www.ramirezcobos.com/
14
 * @link http://www.2amigos.us/
15
 * @package dosamigos\arrayquery\conditions
16
 */
17
class GreaterThan extends Condition
18
{
19
20
    /**
21
     * Returns [[LessThan]] condition
22
     * @return LessThan
23
     */
24
    public function reverse()
25
    {
26
        return new LessThan($this->value);
27
    }
28
29
30
    /**
31
     * @inheritdoc
32
     */
33
    public function matches($data)
34
    {
35
        return ($this->checkType($data, $this->value) && $data > $this->value);
36
    }
37
38
}
39