| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | public static function create(stdClass $data): User |
||
| 14 | { |
||
| 15 | $filteredObject = UserFilterFactory::sanitizeCreationData($data); |
||
| 16 | |||
| 17 | $user = new User(); |
||
| 18 | $user |
||
| 19 | ->setEmail($filteredObject->email) |
||
| 20 | ->setName($filteredObject->name) |
||
| 21 | ->setPassword($filteredObject->password) |
||
| 22 | ; |
||
| 23 | |||
| 24 | $userSpecification = new UserSpecification($user); |
||
| 25 | $userSpecification->validateNew(); |
||
| 26 | |||
| 27 | return $user; |
||
| 28 | } |
||
| 29 | |||
| 59 |