StandardInt   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 32
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A minUnSignedValue() 0 3 1
A maxSignedValue() 0 3 1
A maxUnsignedValue() 0 3 1
A minSignedValue() 0 3 1
1
<?php
2
3
namespace Mbright\Validation\Rule\Validate\MySql;
4
5
use Mbright\Validation\Rule\Validate\ValidateRuleInterface;
6
7
/**
8
 * Validates that data can be inserted into one of the following column types:
9
 * - Int
10
 */
11
class StandardInt extends AbstractMySqlIntegerCase implements ValidateRuleInterface
12
{
13
    /**
14
     * {@inheritdoc}
15
     */
16 27
    protected function minSignedValue()
17
    {
18 27
        return -2147483648;
19
    }
20
21
    /**
22
     * {@inheritdoc}
23
     */
24 21
    protected function maxSignedValue()
25
    {
26 21
        return 2147483647;
27
    }
28
29
    /**
30
     * {@inheritdoc}
31
     */
32 18
    protected function maxUnsignedValue()
33
    {
34 18
        return 4294967295;
35
    }
36
37
    /**
38
     * {@inheritdoc}
39
     */
40 24
    protected function minUnSignedValue()
41
    {
42 24
        return 0;
43
    }
44
}
45