Completed
Push — master ( 5b0de3...057c45 )
by Théo
03:11 queued 01:37
created

deep_copy.php ➔ deep_copy()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace DeepCopy;
4
5
/**
6
 * Deep copy the given value.
7
 *
8
 * @param mixed $value
9
 * @param bool  $useCloneMethod
10
 *
11
 * @return mixed
12
 */
13
function deep_copy($value, $useCloneMethod = false)
14
{
15
    return (new DeepCopy($useCloneMethod))->copy($value);
16
}
17