File tree Expand file tree Collapse file tree 4 files changed +4
-2
lines changed
Expand file tree Collapse file tree 4 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 11<?php
2+
23namespace PH7 \ApiSimpleMenu \Entity ;
34
45class User
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ public function create(mixed $data): array|object
1818 {
1919 $ userValidation = new UserValidation ($ data );
2020 if ($ userValidation ->isCreationSchemaValid ()) {
21- $ userUuid = Uuid::uuid4 (); // assigning a UUID to the user
21+ $ userUuid = Uuid::uuid4 ()-> toString () ; // assigning a UUID to the user
2222
2323 $ userEntity = new UserEntity ();
2424 $ userEntity
Original file line number Diff line number Diff line change 55
66return match ($ resource ) {
77 'user ' => require_once 'user.routes.php ' ,
8+ 'item ' => require_once 'food-item.routes.php ' ,
89 default => require_once 'not-found.routes.php ' ,
910};
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public function getResponse(): string
2121 $ postBody = json_decode ($ postBody );
2222
2323 // Ternary conditional operator operator
24- $ userId = $ _REQUEST ['id ' ] ?? null ; // using the null coalescing operator
24+ $ userId = $ _REQUEST ['id ' ] ?? '' ; // using the null coalescing operator
2525
2626 $ user = new User ();
2727 try {
You can’t perform that action at this time.
0 commit comments