Completed
Push — master ( a9986e...3dd5b4 )
by Philip
02:24
created

Max::validate()   A

Complexity

Conditions 4
Paths 4

Size

Total Lines 9
Code Lines 5

Duplication

Lines 9
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 9
loc 9
rs 9.2
cc 4
eloc 5
nc 4
nop 2
1
<?php
2
3
/*
4
 * This file is part of the Valdi package.
5
 *
6
 * (c) Philip Lehmann-Böhm <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Valdi\Validator;
13
14
/**
15
 * Validator for max values.
16
 */
17
class Max extends Comparator {
18
19
    /**
20
     * {@inheritdoc}
21
     */
22
    protected function compare($a, $b) {
23
        return $a <= $b;
24
    }
25
}
26