Completed
Push — master ( 787391...fa93b3 )
by Adrian
02:11 queued 10s
created

NotMatch::validate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

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