Code Duplication    Length = 4-4 lines in 2 locations

src/Models/MetadataRelationHolder.php 2 locations

@@ 37-40 (lines=4) @@
34
35
    public function getRelationsByKey($className, $keyName)
36
    {
37
        if (!array_key_exists($className, $this->relations)) {
38
            $msg = $className . ' does not exist in holder';
39
            throw new \InvalidArgumentException($msg);
40
        }
41
42
        $rels = $this->relations[$className];
43
        if (!array_key_exists($keyName, $rels)) {
@@ 111-114 (lines=4) @@
108
109
    public function getRelationsByClass($className)
110
    {
111
        if (!array_key_exists($className, $this->relations)) {
112
            $msg = $className . ' does not exist in holder';
113
            throw new \InvalidArgumentException($msg);
114
        }
115
116
        $rels = $this->relations[$className];
117
        $keys = array_keys($rels);