Completed
Push — master ( 0d5c20...3309bb )
by Changwan
09:19
created

EqualToTester::test()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 3
nc 2
nop 3
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
1
<?php
2
namespace Wandu\Validator\Testers;
3
4
class EqualToTester extends PropertyTesterAbstract
5
{
6
    /**
7
     * {@inheritdoc}
8
     */
9
    public function test($data, $origin = null, array $keys = []): bool
10
    {
11
        if (null === $prop = $this->getProp($origin)) return false;
12
        return $prop == $data;
13
    }
14
}
15