Code Duplication    Length = 7-7 lines in 2 locations

src/Access.php 2 locations

@@ 69-75 (lines=7) @@
66
            return $array[$key];
67
        }
68
69
        foreach ($this->splitPath($key) as $segment) {
70
            if (!array_key_exists($segment, $array)) {
71
                return $this->value($default);
72
            }
73
74
            $array = $array[$segment];
75
        }
76
77
        return $array;
78
    }
@@ 122-128 (lines=7) @@
119
            return true;
120
        }
121
122
        foreach ($this->splitPath($key) as $segment) {
123
            if (!array_key_exists($segment, $array)) {
124
                return false;
125
            }
126
127
            $array = $array[$segment];
128
        }
129
130
        return true;
131
    }