Code Duplication    Length = 16-16 lines in 2 locations

src/types/BoolType.php 2 locations

@@ 46-61 (lines=16) @@
43
        return new BoolType("yes", "no");
44
    }
45
46
    public function convertToSQL($value)
47
    {
48
        if ($value === null) {
49
            return null;
50
        }
51
52
        if ($value === true) {
53
            return $this->true_value;
54
        }
55
56
        if ($value === false) {
57
            return $this->false_value;
58
        }
59
60
        throw new InvalidArgumentException("unexpected value: " . print_r($value));
61
    }
62
63
    public function convertToPHP($value)
64
    {
@@ 63-78 (lines=16) @@
60
        throw new InvalidArgumentException("unexpected value: " . print_r($value));
61
    }
62
63
    public function convertToPHP($value)
64
    {
65
        if ($value === null) {
66
            return null;
67
        }
68
69
        if ($value === $this->true_value) {
70
            return true;
71
        }
72
73
        if ($value === $this->false_value) {
74
            return false;
75
        }
76
77
        throw new InvalidArgumentException("unexpected value: " . print_r($value));
78
    }
79
}
80