Completed
Push — master ( f8bd36...f2dc96 )
by Jean-Christophe
01:33
created

IsFalseValidator::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Ubiquity\contents\validation\validators\basic;
4
5
use Ubiquity\contents\validation\validators\Validator;
6
use Ubiquity\utils\base\UString;
7
8
class IsFalseValidator extends Validator {
9
	
10
	public function __construct(){
11
		$this->message="This value should return false";
12
	}
13
	public function validate($value) {
14
		return UString::isBooleanFalse($value);
15
	}
16
	
17
	/**
18
	 * {@inheritDoc}
19
	 * @see \Ubiquity\contents\validation\validators\Validator::getParameters()
20
	 */
21
	public function getParameters(): array {
22
		return ["value"];
23
	}
24
}
25
26