_Integer   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A validate() 0 4 2
1
<?php
2
3
/**
4
 * @package Cadmium\System\Utils
5
 * @author Anton Romanov
6
 * @copyright Copyright (c) 2015-2017, Anton Romanov
7
 * @link http://cadmium-cms.com
8
 */
9
10
namespace Utils\Schema {
11
12
	class _Integer {
13
14
		/**
15
		 * Validate a value
16
		 *
17
		 * @return int|null : the validated value or null on failure
18
		 */
19
20
		public function validate($value) {
21
22
			return (is_scalar($value) ? intval($value) : null);
23
		}
24
	}
25
}
26