| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | private function modelsWithRelations(array $models): array |
||
| 39 | { |
||
| 40 | if (Cache::has('schematics')) { |
||
| 41 | return Cache::get('schematics'); |
||
| 42 | } |
||
| 43 | |||
| 44 | $data = [ |
||
| 45 | 'models' => $models, |
||
| 46 | 'relations' => RelationMapper::map($models), |
||
| 47 | ]; |
||
| 48 | |||
| 49 | Cache::put('schematics', $data, 1440); |
||
| 50 | |||
| 51 | return $data; |
||
| 52 | } |
||
| 53 | } |
||
| 54 |