Completed
Push — master ( b22df9...4eff91 )
by Marcus
02:10
created

Enum   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 66.67%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 13
ccs 4
cts 6
cp 0.6667
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 3
1
<?php
2
3
namespace Mbright\Validation\Rule\Validate\MySql;
4
5
use Mbright\Validation\Rule\Validate\InValues;
6
7
class Enum extends InValues
8
{
9 6
    public function __construct(array $array)
10
    {
11 6
        $arrayCount = count($array);
12
13 6
        if ($arrayCount <= 0 || $arrayCount > 65535) {
14 6
            throw new \InvalidArgumentException('Enum must have 1 value and no more than 65,535 values');
15
        }
16
17
        parent::__construct($array);
18
    }
19
}
20