Skip to content

Commit 0743d5b

Browse files
authored
Merge pull request #1087 from JB-oclock/main
change signature method add/remove repository
2 parents adc846e + c403645 commit 0743d5b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/Resources/skeleton/doctrine/Repository.tpl.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct(ManagerRegistry $registry)
3131
* @throws ORMException
3232
* @throws OptimisticLockException
3333
*/
34-
public function add(<?= $entity_class_name ?> $entity, bool $flush = true): void
34+
public function add(<?= $entity_class_name ?> $entity, bool $flush = false): void
3535
{
3636
$this->_em->persist($entity);
3737
if ($flush) {
@@ -43,7 +43,7 @@ public function add(<?= $entity_class_name ?> $entity, bool $flush = true): void
4343
* @throws ORMException
4444
* @throws OptimisticLockException
4545
*/
46-
public function remove(<?= $entity_class_name ?> $entity, bool $flush = true): void
46+
public function remove(<?= $entity_class_name ?> $entity, bool $flush = false): void
4747
{
4848
$this->_em->remove($entity);
4949
if ($flush) {

tests/Doctrine/fixtures/expected_xml/src/Repository/UserRepository.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function __construct(ManagerRegistry $registry)
2727
* @throws ORMException
2828
* @throws OptimisticLockException
2929
*/
30-
public function add(UserXml $entity, bool $flush = true): void
30+
public function add(UserXml $entity, bool $flush = false): void
3131
{
3232
$this->_em->persist($entity);
3333
if ($flush) {
@@ -39,7 +39,7 @@ public function add(UserXml $entity, bool $flush = true): void
3939
* @throws ORMException
4040
* @throws OptimisticLockException
4141
*/
42-
public function remove(UserXml $entity, bool $flush = true): void
42+
public function remove(UserXml $entity, bool $flush = false): void
4343
{
4444
$this->_em->remove($entity);
4545
if ($flush) {

tests/Doctrine/fixtures/expected_xml/src/Repository/XOtherRepository.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function __construct(ManagerRegistry $registry)
2727
* @throws ORMException
2828
* @throws OptimisticLockException
2929
*/
30-
public function add(XOther $entity, bool $flush = true): void
30+
public function add(XOther $entity, bool $flush = false): void
3131
{
3232
$this->_em->persist($entity);
3333
if ($flush) {
@@ -39,7 +39,7 @@ public function add(XOther $entity, bool $flush = true): void
3939
* @throws ORMException
4040
* @throws OptimisticLockException
4141
*/
42-
public function remove(XOther $entity, bool $flush = true): void
42+
public function remove(XOther $entity, bool $flush = false): void
4343
{
4444
$this->_em->remove($entity);
4545
if ($flush) {

0 commit comments

Comments
 (0)