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

NotMatch   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 13
ccs 4
cts 4
cp 1
c 0
b 0
f 0
wmc 1
lcom 1
cbo 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A validate() 0 7 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