Skip to content

Commit 1802676

Browse files
committed
Fix small mistake in doctrine example
1 parent 697ee12 commit 1802676

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

examples/doctrine/src/UserEntity.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class UserEntity
2323
* @var string
2424
*/
2525
private $name;
26-
26+
2727
/**
2828
* @ORM\Column(name="status", type="UserStatus", nullable=false)
2929
* @var UserStatus
@@ -35,27 +35,27 @@ public function __construct(string $name)
3535
$this->name = $name;
3636
$this->status = UserStatus::ACTIVE();
3737
}
38-
39-
public function getId(): string
38+
39+
public function getId(): ?string
4040
{
41-
return $this->id === null ? null : (string)$this->id;
41+
return $this->id;
4242
}
43-
43+
4444
public function getName(): string
4545
{
4646
return $this->name;
4747
}
48-
48+
4949
public function setName(string $name)
5050
{
5151
$this->name = $name;
5252
}
53-
53+
5454
public function getStatus(): UserStatus
5555
{
5656
return $this->status;
5757
}
58-
58+
5959
public function setStatus(UserStatus $status)
6060
{
6161
$this->status = $status;

0 commit comments

Comments
 (0)