| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 28 | public function hydrate($attributes = []) |
||
| 29 | { |
||
| 30 | $attributes = $this->orm |
||
| 31 | ->getCastingManager() |
||
| 32 | ->castArray($attributes, $this->mapper->getCasts()); |
||
| 33 | $attributes = Arr::renameKeys($attributes, $this->mapper->getColumnAttributeMap()); |
||
| 34 | $class = $this->mapper->getEntityClass() ?? GenericEntity::class; |
||
| 35 | |||
| 36 | return new $class($attributes, $this->orm->getCastingManager()); |
||
| 37 | } |
||
| 52 |