Skip to content

Commit

Permalink
[csm] nullable setter fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
jrushlow committed Sep 22, 2022
1 parent a3231f0 commit 4a88d79
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/Util/ClassSourceManipulatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public function getAddSetterTests(): \Generator
null,
false,
[],
'User_simple.php',
'User_simple_null_type.php',
];
}

Expand Down
26 changes: 26 additions & 0 deletions tests/Util/fixtures/add_setter/User_simple_null_type.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

namespace App\Entity;

use Doctrine\ORM\Mapping as ORM;

#[ORM\Entity]
class User
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column()]
private ?int $id = null;

public function getId(): ?int
{
return $this->id;
}

public function setFooProp($fooProp): self
{
$this->fooProp = $fooProp;

return $this;
}
}

0 comments on commit 4a88d79

Please sign in to comment.