Skip to content

Commit 8761a5f

Browse files
committed
Code chapter 2
Signed-off-by: Howriq <[email protected]>
1 parent 7a22f63 commit 8761a5f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Book/src/Entity/Book.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use Doctrine\ORM\Mapping as ORM;
88
use Light\App\Entity\AbstractEntity;
99
use Light\Book\Repository\BookRepository;
10-
use Ramsey\Uuid\UuidInterface;
1110

1211
#[ORM\Entity(repositoryClass: BookRepository::class)]
1312
#[ORM\Table(name: 'books')]
@@ -42,15 +41,15 @@ public function setAuthor(string $author): void
4241

4342
/**
4443
* @return array{
45-
* id: UuidInterface,
44+
* id: non-empty-string,
4645
* title: string,
4746
* author: string
4847
* }
4948
*/
5049
public function getArrayCopy(): array
5150
{
5251
return [
53-
'id' => $this->id,
52+
'id' => $this->id->toString(),
5453
'title' => $this->title,
5554
'author' => $this->author,
5655
];

0 commit comments

Comments
 (0)