Conditions | 4 |
Paths | 3 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function populateFromDb(JsonWpOptionSerializableInterface $obj) |
||
27 | { |
||
28 | $option = get_option($obj->getWpOptionName()); |
||
29 | if ($option) { |
||
30 | $json = json_decode($option); |
||
31 | if (is_array($json) || $json instanceof stdClass) { |
||
32 | return $obj->fromJsonSerializedData($json); |
||
33 | } |
||
34 | } |
||
35 | return false; |
||
36 | } |
||
37 | |||
55 |