LessThan   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
/**
11
 * LessThan checks if value is less than to the data searched.
12
 *
13
 * @author Antonio Ramirez <[email protected]>
14
 * @link http://www.ramirezcobos.com/
15
 * @link http://www.2amigos.us/
16
 * @package dosamigos\arrayquery\conditions
17
 */
18
class LessThan extends Condition
19
{
20
21
    /**
22
     * Returns [[GreaterThan]] condition
23
     * @return GreaterThan
24
     */
25
    public function reverse()
26
    {
27
        return new GreaterThan($this->value);
28
    }
29
30
31
    /**
32
     * @inheritdoc
33
     */
34
    public function matches($data)
35
    {
36
        return ($this->checkType($data, $this->value) && $data < $this->value);
37
    }
38
39
}
40