Code Duplication    Length = 7-7 lines in 2 locations

Services/ArrayAccessor.php 2 locations

@@ 133-139 (lines=7) @@
130
    {
131
        $keys = explode('.', $path);
132
        $last = array_pop($keys);
133
        foreach ($keys as $k) {
134
            if (isset($data[$k]) && is_array($data[$k])) {
135
                $data =& $data[$k];
136
            } else {
137
                return null;
138
            }
139
        }
140
        return isset($data[$last]) && is_array($data[$last]) ? count($data[$last]) : null;
141
    }
142
@@ 180-186 (lines=7) @@
177
    {
178
        $keys = explode('.', $path);
179
        $last = array_pop($keys);
180
        foreach ($keys as $k) {
181
            if (isset($data[$k]) && is_array($data[$k])) {
182
                $data =& $data[$k];
183
            } else {
184
                return;
185
            }
186
        }
187
        unset($data[$last]);
188
    }
189