NotBlank::validate()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 3
nc 2
nop 1
1
<?php
2
3
/**
4
 * Not Blank validator
5
 *
6
 * @category  	Venus
7
 * @package		Venus\lib\Validator
8
 * @author    	Judicaël Paquet <[email protected]>
9
 * @copyright 	Copyright (c) 2013-2014 PAQUET Judicaël FR Inc. (https://github.com/las93)
10
 * @license   	https://github.com/las93/venus2/blob/master/LICENSE.md Tout droit réservé à PAQUET Judicaël
11
 * @version   	Release: 1.0.0
12
 * @filesource	https://github.com/las93/venus2
13
 * @link      	https://github.com/las93
14
 * @since     	1.0
15
 */
16
namespace Venus\lib\Validator;
17
18
/**
19
 * Not Blank validator
20
 *
21
 * @category  	Venus
22
 * @package		Venus\lib\Validator
23
 * @author    	Judicaël Paquet <[email protected]>
24
 * @copyright 	Copyright (c) 2013-2014 PAQUET Judicaël FR Inc. (https://github.com/las93)
25
 * @license   	https://github.com/las93/venus2/blob/master/LICENSE.md Tout droit réservé à PAQUET Judicaël
26
 * @version   	Release: 1.0.0
27
 * @filesource	https://github.com/las93/venus2
28
 * @link      	https://github.com/las93
29
 * @since     	1.0
30
 */
31
class NotBlank extends Common
32
{
33
	/**
34
	 * validate the NotBlank
35
	 *
36
	 * @access public
37
	 * @param  string $sValue
38
	 * @return bool
39
	 */
40
	public function validate(string $sValue = null) : bool
41
	{
42
		if (trim($sValue) != '') { return true; }
43
		else { return false; }
44
	}
45
}
46