| Conditions | 4 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 6 | ||
| Bugs | 0 | Features | 2 |
| 1 | <?php |
||
| 62 | public function getRelationship($model, $name) |
||
| 63 | { |
||
| 64 | $method = $this->getRelationshipMethodName($name); |
||
| 65 | |||
| 66 | if (method_exists($this, $method)) { |
||
| 67 | $relationship = $this->$method($model); |
||
| 68 | |||
| 69 | if ($relationship !== null && ! ($relationship instanceof Relationship)) { |
||
| 70 | throw new LogicException('Relationship method must return null or an instance of Tobscure\JsonApi\Relationship'); |
||
|
|
|||
| 71 | } |
||
| 72 | |||
| 73 | return $relationship; |
||
| 74 | } |
||
| 75 | } |
||
| 76 | |||
| 94 |
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.