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

GreaterThanOrEqualTester   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 11
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 GreaterThanOrEqualTester 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