| Conditions | 1 |
| Paths | 1 |
| Total Lines | 30 |
| Code Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 28 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | 2 | public function __construct() |
|
| 14 | { |
||
| 15 | 1 | $config = [ |
|
| 16 | 1 | 'description' => 'Mandatory fields to complete a user registration', |
|
| 17 | 1 | 'fields' => fn (): array => [ |
|
| 18 | 2 | 'password' => [ |
|
| 19 | 2 | 'type' => self::nonNull(_types()->get(PasswordType::class)), |
|
| 20 | 2 | ], |
|
| 21 | 2 | 'firstName' => [ |
|
| 22 | 2 | 'type' => self::nonNull(self::string()), |
|
| 23 | 2 | ], |
|
| 24 | 2 | 'lastName' => [ |
|
| 25 | 2 | 'type' => self::nonNull(self::string()), |
|
| 26 | 2 | ], |
|
| 27 | 2 | 'street' => [ |
|
| 28 | 2 | 'type' => self::nonNull(self::string()), |
|
| 29 | 2 | ], |
|
| 30 | 2 | 'postcode' => [ |
|
| 31 | 2 | 'type' => self::nonNull(self::string()), |
|
| 32 | 2 | ], |
|
| 33 | 2 | 'locality' => [ |
|
| 34 | 2 | 'type' => self::nonNull(self::string()), |
|
| 35 | 2 | ], |
|
| 36 | 2 | 'country' => [ |
|
| 37 | 2 | 'type' => self::nonNull(_types()->getId(Country::class)), |
|
| 38 | 2 | ], |
|
| 39 | 2 | ], |
|
| 40 | 1 | ]; |
|
| 41 | |||
| 42 | 1 | parent::__construct($config); |
|
| 43 | } |
||
| 45 |