Conditions | 6 |
Paths | 6 |
Total Lines | 21 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 16 |
CRAP Score | 6 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
74 | 3 | public function unserialize($serialized) |
|
75 | { |
||
76 | 3 | $data = unserialize($serialized); |
|
77 | |||
78 | if ($this instanceof DisplayRule |
||
79 | 3 | && method_exists($this, 'unserializeRule') |
|
80 | 3 | && array_key_exists('displayRule', $data) |
|
81 | 3 | ) { |
|
82 | 3 | $this->unserializeRule($data['displayRule']); |
|
|
|||
83 | 3 | unset($data['displayRule']); |
|
84 | 3 | } |
|
85 | |||
86 | 3 | foreach ($data as $key => $value) { |
|
87 | 3 | if (property_exists($this, $key)) { |
|
88 | 3 | $this->{$key} = $value; |
|
89 | 3 | } |
|
90 | 3 | } |
|
91 | |||
92 | 3 | $app = Container::getInstance(); |
|
93 | 3 | $this->render = $app->make(MenuRender::class); |
|
94 | } |
||
95 | } |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.