BooleanColumn   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 31
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getNumericUnsigned() 0 4 1
A setNumericUnsigned() 0 7 1
A isNumericUnsigned() 0 4 1
1
<?php
2
3
namespace Soluble\Datatype\Column\Definition;
4
5
class BooleanColumn extends AbstractColumnDefinition implements NumericColumnInterface
6
{
7
    /**
8
     * @return bool
9 1
     */
10
    public function getNumericUnsigned()
11 1
    {
12
        return false;
13
    }
14
15
    /**
16
     * @param bool $numericUnsigned
17
     *
18 1
     * @return BooleanColumn
19
     */
20
    public function setNumericUnsigned($numericUnsigned)
21 1
    {
22 1
        // do nothing
23
        $numericUnsigned = false;
0 ignored issues
show
Unused Code introduced by
$numericUnsigned is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
24
25
        return $this;
26
    }
27
28
    /**
29 1
     * @return bool
30
     */
31 1
    public function isNumericUnsigned()
32
    {
33
        return false;
34
    }
35
}
36