Code Duplication    Length = 16-16 lines in 2 locations

src/types/BoolType.php 2 locations

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