Passed
Push — master ( c53668...8969dd )
by Jean-Christophe
08:33
created

NotNullValidator::validate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 2
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Ubiquity\contents\validation\validators\basic;
4
5
use Ubiquity\contents\validation\validators\Validator;
6
7
class NotNullValidator extends Validator {
8
	
9
	public function __construct(){
10
		$this->message="This value should not be null";
11
	}
12
	public function validate($value) {
13
		return $value!==null;
14
	}
15
}
16
17