Skip to content

Commit c403645

Browse files
committed
mistake resolved
1 parent 96e0918 commit c403645

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
@@ -32,7 +32,7 @@ public function __construct(ManagerRegistry $registry)
3232
public function add(<?= $entity_class_name ?> $entity, bool $flush = false): void
3333
{
3434
$this->_em->persist($entity);
35-
if (!$flush) {
35+
if ($flush) {
3636
$this->_em->flush();
3737
}
3838
}
@@ -44,7 +44,7 @@ public function add(<?= $entity_class_name ?> $entity, bool $flush = false): voi
4444
public function remove(<?= $entity_class_name ?> $entity, bool $flush = false): void
4545
{
4646
$this->_em->remove($entity);
47-
if (!$flush) {
47+
if ($flush) {
4848
$this->_em->flush();
4949
}
5050
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function __construct(ManagerRegistry $registry)
2828
public function add(UserXml $entity, bool $flush = false): void
2929
{
3030
$this->_em->persist($entity);
31-
if (!$flush) {
31+
if ($flush) {
3232
$this->_em->flush();
3333
}
3434
}
@@ -40,7 +40,7 @@ public function add(UserXml $entity, bool $flush = false): void
4040
public function remove(UserXml $entity, bool $flush = false): void
4141
{
4242
$this->_em->remove($entity);
43-
if (!$flush) {
43+
if ($flush) {
4444
$this->_em->flush();
4545
}
4646
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function __construct(ManagerRegistry $registry)
2828
public function add(XOther $entity, bool $flush = false): void
2929
{
3030
$this->_em->persist($entity);
31-
if (!$flush) {
31+
if ($flush) {
3232
$this->_em->flush();
3333
}
3434
}
@@ -40,7 +40,7 @@ public function add(XOther $entity, bool $flush = false): void
4040
public function remove(XOther $entity, bool $flush = false): void
4141
{
4242
$this->_em->remove($entity);
43-
if (!$flush) {
43+
if ($flush) {
4444
$this->_em->flush();
4545
}
4646
}

0 commit comments

Comments
 (0)