GreaterThan   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 22
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A reverse() 0 4 1
A matches() 0 4 2
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