BooleanColumn   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 4
Bugs 2 Features 0
Metric Value
wmc 3
c 4
b 2
f 0
lcom 0
cbo 1
dl 0
loc 30
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getNumericUnsigned() 0 4 1
A setNumericUnsigned() 0 6 1
A isNumericUnsigned() 0 4 1
1
<?php
2
namespace Soluble\Db\Metadata\Column\Definition;
3
4
class BooleanColumn extends AbstractColumnDefinition implements NumericColumnInterface
5
{
6
    /**
7
     * @return bool
8
     */
9
    public function getNumericUnsigned()
10
    {
11
        return false;
12
    }
13
14
    /**
15
     * @param bool $numericUnsigned
16
     * @return BooleanColumn
17
     */
18
    public function setNumericUnsigned($numericUnsigned)
19
    {
20
        // do nothing
21
        $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...
22
        return $this;
23
    }
24
25
26
    /**
27
     * @return bool
28
     */
29
    public function isNumericUnsigned()
30
    {
31
        return false;
32
    }
33
}
34