Skip to content

Commit 4a88d79

Browse files
committed
[csm] nullable setter fixture
1 parent a3231f0 commit 4a88d79

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

tests/Util/ClassSourceManipulatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public function getAddSetterTests(): \Generator
176176
null,
177177
false,
178178
[],
179-
'User_simple.php',
179+
'User_simple_null_type.php',
180180
];
181181
}
182182

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
namespace App\Entity;
4+
5+
use Doctrine\ORM\Mapping as ORM;
6+
7+
#[ORM\Entity]
8+
class User
9+
{
10+
#[ORM\Id]
11+
#[ORM\GeneratedValue]
12+
#[ORM\Column()]
13+
private ?int $id = null;
14+
15+
public function getId(): ?int
16+
{
17+
return $this->id;
18+
}
19+
20+
public function setFooProp($fooProp): self
21+
{
22+
$this->fooProp = $fooProp;
23+
24+
return $this;
25+
}
26+
}

0 commit comments

Comments
 (0)