| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 12 | 
| Code Lines | 9 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 32 | public function create($data): User  | 
            ||
| 33 |     { | 
            ||
| 34 |         if (isset($data['_id'])) { | 
            ||
| 35 | $user = new User();  | 
            ||
| 36 | $user->_id = $data['_id'];  | 
            ||
| 
                                                                                                    
                        
                         | 
                |||
| 37 | $user->fill($data);  | 
            ||
| 38 | $user->save();  | 
            ||
| 39 |         } else { | 
            ||
| 40 | $user = User::create($data);  | 
            ||
| 41 | }  | 
            ||
| 42 | Cache::put($this->getCacheName($user->id), $user, $this->getCacheTime());  | 
            ||
| 43 | return $user;  | 
            ||
| 44 | }  | 
            ||
| 64 |