| Conditions | 5 | 
| Paths | 16 | 
| Total Lines | 20 | 
| Code Lines | 13 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 13 | 
| CRAP Score | 5 | 
| Changes | 2 | ||
| Bugs | 0 | Features | 1 | 
| 1 | <?php  | 
            ||
| 14 | public function details(): Details  | 
            ||
| 15 |     { | 
            ||
| 16 | // Generic model details  | 
            ||
| 17 | 92 | // might be able to remove this as id isnt general info  | 
            |
| 18 | 92 | $id = Str::slug($this->registration->key().'-'.$this->model->id);  | 
            |
| 19 | 92 | $key = $this->registration->key();  | 
            |
| 20 | 92 | $labelSingular = property_exists($this->model, 'labelSingular') ? $this->model->labelSingular : Str::singular($key);  | 
            |
| 21 | 92 | $labelPlural = property_exists($this->model, 'labelPlural') ? $this->model->labelPlural : Str::plural($key);  | 
            |
| 22 | $internal_label = contract($this->model, ProvidesFlatReference::class) ? $this->model->flatReferenceLabel() : $key;  | 
            ||
| 23 | |||
| 24 | 92 | // Manager index and header info  | 
            |
| 25 | $title = $this->model->title ?? ($this->model->id ? $labelSingular . ' ' . $this->model->id : $labelSingular);  | 
            ||
| 26 | 92 | ||
| 27 | 92 | return new Details(  | 
            |
| 28 | 92 | $id,  | 
            |
| 29 | 92 | $key,  | 
            |
| 30 | 92 | $labelSingular.'',  | 
            |
| 31 | 92 | $labelPlural.'',  | 
            |
| 32 | 92 | $internal_label,  | 
            |
| 33 | $title.''  | 
            ||
| 34 | );  | 
            ||
| 37 |