Completed
Pull Request — master (#61)
by
unknown
01:35
created

NotMatch::validate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 4
cts 4
cp 1
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 2
crap 1
1
<?php
2
namespace Sirius\Validation\Rule;
3
4
5
class NotMatch extends Match
6
{
7
    const MESSAGE = 'This input does match {item}';
8
    const LABELED_MESSAGE = '{label} does match {item}';
9
10 3
    public function validate($value, $valueIdentifier = null)
11
    {
12 3
        parent::validate($value, $valueIdentifier);
13 3
        $this->success = ! $this->success;
14
15 3
        return $this->success;
16
    }
17
}
18