Code Duplication    Length = 7-7 lines in 2 locations

src/Access.php 1 location

@@ 145-151 (lines=7) @@
142
        $keys    = explode('.', $key);
143
        $current = &$array;
144
145
        foreach ($keys as $key) {
146
            if (!isset($current[$key])) {
147
                return $array;
148
            }
149
150
            $current = &$current[$key];
151
        }
152
153
        $current = call_user_func($callback, $current);
154

src/Transform.php 1 location

@@ 48-54 (lines=7) @@
45
    {
46
        $keys = explode('.', $key);
47
48
        foreach ($keys as $key) {
49
            if (!isset($array[$key])) {
50
                return null;
51
            }
52
53
            $array = $array[$key];
54
        }
55
56
        if (!is_array($array)) {
57
            return null;