Code Duplication    Length = 8-8 lines in 2 locations

src/type/Type.php 1 location

@@ 73-80 (lines=8) @@
70
            : $this->checkMatches($this->id, $other->getId());
71
    }
72
73
    protected function checkMatches($lhs, $rhs)
74
    {
75
        if ($lhs === self::NONE || $rhs === self::NONE) {
76
            return false;
77
        }
78
79
        return (string) $lhs === (string) $rhs;
80
    }
81
82
    public function jsonSerialize()
83
    {

src/target/AbstractTarget.php 1 location

@@ 128-135 (lines=8) @@
125
        return $this->matchStrings($this->type, $other->getType());
126
    }
127
128
    protected function matchStrings($lhs, $rhs)
129
    {
130
        if ($lhs === self::NONE || $rhs === self::NONE) {
131
            return false;
132
        }
133
134
        return (string) $lhs === (string) $rhs;
135
    }
136
137
    public function jsonSerialize()
138
    {