| Conditions | 6 |
| Paths | 6 |
| Total Lines | 21 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 6 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 74 | 2 | public function unserialize($serialized) |
|
| 75 | { |
||
| 76 | 2 | $data = unserialize($serialized); |
|
| 77 | |||
| 78 | 2 | if ($this instanceof DisplayRule |
|
| 79 | 2 | && method_exists($this, 'unserializeRule') |
|
| 80 | 2 | && array_key_exists('displayRule', $data) |
|
| 81 | ) { |
||
| 82 | 2 | $this->unserializeRule($data['displayRule']); |
|
|
|
|||
| 83 | 2 | unset($data['displayRule']); |
|
| 84 | } |
||
| 85 | |||
| 86 | 2 | foreach ($data as $key => $value) { |
|
| 87 | 2 | if (property_exists($this, $key)) { |
|
| 88 | 2 | $this->{$key} = $value; |
|
| 89 | } |
||
| 90 | } |
||
| 91 | |||
| 92 | 2 | $app = Container::getInstance(); |
|
| 93 | 2 | $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.