Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
28 | public static function setArr($key, $value) |
||
29 | { |
||
30 | foreach (explode('.', $key) as $keyName) { |
||
31 | if (false === isset($source)) { |
||
32 | $source = array(); |
||
33 | $sourceRef = &$source; |
||
34 | } |
||
35 | $keyName = trim($keyName); |
||
36 | $sourceRef = &$sourceRef[$keyName]; |
||
|
|||
37 | } |
||
38 | $sourceRef = $value; |
||
39 | unset($sourceRef); |
||
40 | return $source; |
||
41 | } |
||
43 | } |