LessThanTester   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 11
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A test() 0 5 2
1
<?php
2
namespace Wandu\Validator\Testers;
3
4
class LessThanTester extends PropertyTesterAbstract
5
{
6
    /**
7
     * {@inheritdoc}
8
     */
9 1
    public function test($data, $origin = null, array $keys = []): bool
10
    {
11 1
        if (null === $prop = $this->getProp($origin)) return false;
12 1
        return $prop > $data;
13
    }
14
}
15