Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
43 | private function resolveModel($model) |
||
44 | { |
||
45 | // todo: should there be a relatedModelClass or modelRelation attr? |
||
46 | // $model is a Model class |
||
47 | if ($model instanceof $this->modelClass) { |
||
48 | return $model; |
||
49 | } |
||
50 | |||
51 | // Find the model using a model key |
||
52 | else { |
||
53 | return $this->modelQuery()->with($this->eagerLoadRelationships)->find($model); |
||
54 | } |
||
67 |