### ExclusiveMaximum   A last analyzed 2018-05-12 04:28 UTC

#### Complexity

 Total Complexity 5

#### Size/Duplication

 Total Lines 36 Duplicated Lines 100 %

#### Coupling/Cohesion

 Components 1 Dependencies 2

#### Test Coverage

 Coverage 90.91%

#### Importance

 Changes 0
Metric Value
dl 36
loc 36
ccs 10
cts 11
cp 0.9091
rs 10
c 0
b 0
f 0
wmc 5
lcom 1
cbo 2

#### 2 Methods

Rating   Name   Duplication   Size   Complexity
A __construct() 4 4 1
A validate() 15 15 4

#### Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

 1 `precision = \$precision;` 25 4 ` }` 26 27 ` /**` 28 ` * {@inheritdoc}` 29 ` */` 30 4 ` public function validate(\$value, \$parameter, Validator \$validator)` 31 ` {` 32 4 ` Assert::type(\$parameter, 'boolean', self::KEYWORD, \$validator->getSchemaPath());` 33 4 ` Assert::hasProperty(\$validator->getSchema(), 'maximum', self::KEYWORD, \$validator->getSchemaPath());` 34 35 4 ` if (\$parameter !== true) {` 36 ` return null;` 37 ` }` 38 39 4 ` if (!is_numeric(\$value) || bccomp(\$value, \$validator->getSchema()->maximum, \$this->precision) === -1) {` 40 2 ` return null;` 41 ` }` 42 43 4 ` return error('The number must be less than {parameter}.', \$validator);` 44 ` }` 45 `}` 46