Equal::matches()   A
last analyzed

Complexity

Conditions 2
Paths 3

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 2
eloc 2
nc 3
nop 1
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
 * Equal checks if value is equal 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 Equal extends Condition
19
{
20
21
    /**
22
     * @inheritdoc
23
     */
24
    public function matches($data)
25
    {
26
        return (($this->checkType($data, $this->value) && strcmp($data, $this->value) === 0) xor $this->negate);
27
    }
28
}
29