Completed
Push — master ( 929034...adc5e6 )
by Marcus
02:23
created

MediumInt   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 34
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

4 Methods

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