Code Duplication    Length = 16-16 lines in 2 locations

src/get.php 1 location

@@ 14-29 (lines=16) @@
11
 *
12
 * @return mixed
13
 */
14
function get()
15
{
16
    $args = func_get_args();
17
18
    $get = function ($map, $key, $notfound = false) {
19
        $map = (array) $map;
20
        
21
        if (array_key_exists($key, $map)) {
22
            return $map[$key];
23
        }
24
25
        return $notfound;
26
    };
27
28
    return call_user_func_array(curry($get), $args);
29
}
30

src/prop.php 1 location

@@ 10-25 (lines=16) @@
7
 *
8
 * @return mixed
9
 */
10
function prop()
11
{
12
    $args = func_get_args();
13
14
    $prop = function ($prop, $ls) {
15
        $ls = (array) $ls;
16
17
        if (array_key_exists($prop, $ls)) {
18
            return $ls[$prop];
19
        }
20
21
        return false;
22
    };
23
24
    return call_user_func_array(curry($prop), $args);
25
}
26