| Conditions | 3 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | public function passes($attribute, $value) |
||
|
1 ignored issue
–
show
|
|||
| 37 | { |
||
| 38 | $type = $this->poly_type; |
||
| 39 | |||
| 40 | if (Relation::getMorphedModel($type)) { |
||
| 41 | $type = Relation::getMorphedModel($type); |
||
| 42 | } |
||
| 43 | |||
| 44 | if (!class_exists($type)) { |
||
| 45 | return false; |
||
| 46 | } |
||
| 47 | |||
| 48 | return !empty(resolve($type)->find($value)); |
||
| 49 | } |
||
| 61 |