| Conditions | 4 |
| Paths | 8 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4.5923 |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 65 | $this->data = $data; |
||
| 66 | } |
||
| 67 | |||
| 68 | 3 | public function jsonSerialize() |
|
| 69 | { |
||
| 70 | 3 | $relationship = []; |
|
| 71 | |||
| 72 | 3 | if ($this->data) { |
|
| 73 | 3 | $relationship['data'] = is_array($this->data) |
|
| 74 | 3 | ? array_map([$this, 'buildIdentifier'], $this->data) |
|
| 75 | 3 | : $this->buildIdentifier($this->data); |
|
| 76 | 3 | } |
|
| 77 | |||
| 78 | 3 | return array_filter($relationship + [ |
|
| 79 | 3 | 'meta' => $this->meta, |
|
| 80 | 3 | 'links' => $this->links |
|
| 81 | 3 | ]); |
|
| 82 | } |
||
| 83 | |||
| 92 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.