| Conditions | 4 | 
| Paths | 4 | 
| Total Lines | 17 | 
| Code Lines | 12 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 15 | public function addEagerConstraints(array $models) | ||
| 16 |     { | ||
| 17 |         if ($this->customEagerConstraintsCallback) { | ||
| 18 | ($this->customEagerConstraintsCallback)($this->query, $models); | ||
| 19 | return; | ||
| 20 | } | ||
| 21 | |||
| 22 |         if ($this->hasLeadingCompositeKey()) { | ||
|  | |||
| 23 | $this->addEagerConstraintsWithCompositeKey($models); | ||
| 24 |         } else { | ||
| 25 | parent::addEagerConstraints($models); | ||
| 26 | |||
| 27 |             if (is_array($this->foreignKeys[0])) { | ||
| 28 | $this->query->where( | ||
| 29 | $this->throughParent->qualifyColumn($this->foreignKeys[0][0]), | ||
| 30 | '=', | ||
| 31 | $this->farParent->getMorphClass() | ||
| 32 | ); | ||
| 62 |