SmallInt::minSignedValue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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
 * - SmallInt
8
 */
9
class SmallInt extends AbstractMySqlIntegerCase
10
{
11
    /**
12
     * {@inheritdoc}
13
     */
14 15
    protected function minSignedValue()
15
    {
16 15
        return -32768;
17
    }
18
19
    /**
20
     * {@inheritdoc}
21
     */
22 12
    protected function maxSignedValue()
23
    {
24 12
        return 32767;
25
    }
26
27
    /**
28
     * {@inheritdoc}
29
     */
30 9
    protected function maxUnsignedValue()
31
    {
32 9
        return 65535;
33
    }
34
35
    /**
36
     * {@inheritdoc}
37
     */
38 12
    protected function minUnSignedValue()
39
    {
40 12
        return 0;
41
    }
42
}
43