| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 12 | 
| Code Lines | 6 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 7 | 
| CRAP Score | 2 | 
| Changes | 2 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 19 | 2 | public function first($columns = [ '*' ]): mixed | |
| 20 |     { | ||
| 21 | /* ad-hoc solution to prevent real call to database */ | ||
| 22 | 2 | $wheres = $this->query->wheres; | |
| 23 | 2 | $key = InternalSettingsModel::ATTR_ID; | |
| 24 | 2 |         $val    = collect($wheres)->firstWhere('column', "{$this->query->from}.{$key}"); | |
|  | |||
| 25 | |||
| 26 | 2 |         if ($val) { | |
| 27 | 1 | return $this->find($val['value']); | |
| 28 | } | ||
| 29 | |||
| 30 | 1 | return parent::first($columns); | |
| 31 | } | ||
| 38 |