Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
19 | public function unserialize($serial) { |
||
20 | $datas = \json_decode ( $serial ); |
||
21 | $class = $datas->class; |
||
22 | $stdObj = $datas->o; |
||
23 | $count = \strlen ( $class ); |
||
24 | $temp = \serialize ( $stdObj ); |
||
25 | $temp = \preg_replace ( "@^O:8:\"stdClass\":@", "O:$count:\"$class\":", $temp ); |
||
26 | $o = \unserialize ( $temp ); |
||
27 | $o->_rest = ( array ) ($o->_rest); |
||
28 | return $o; |
||
29 | } |
||
32 |