| Conditions | 3 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 35 | public function whereTrackableType($trackable_type): self |
||
| 36 | { |
||
| 37 | $trackable_type = (array) $trackable_type; |
||
| 38 | $this->where(function (self $query) use ($trackable_type) { |
||
| 39 | foreach ($trackable_type as $table) { |
||
| 40 | if ((new StringHelpers($table))->inString('_')) { |
||
| 41 | $query->orWhereLike('trackable_type', $table); |
||
| 42 | } else { |
||
| 43 | $query->orWhere('trackable_type', '=', $table); |
||
| 44 | } |
||
| 45 | } |
||
| 46 | }); |
||
| 47 | |||
| 48 | return $this; |
||
| 49 | } |
||
| 51 |