File tree Expand file tree Collapse file tree 3 files changed +18
-12
lines changed
src/Resources/skeleton/doctrine
tests/Doctrine/fixtures/expected_xml/src/Repository Expand file tree Collapse file tree 3 files changed +18
-12
lines changed Original file line number Diff line number Diff line change @@ -21,19 +21,21 @@ public function __construct(ManagerRegistry $registry)
2121
2222 public function save(<?= $ entity_class_name ?> $entity, bool $flush = false): void
2323 {
24- $this->getEntityManager()->persist($entity);
24+ $entityManager = $this->getEntityManager();
25+ $entityManager->persist($entity);
2526
2627 if ($flush) {
27- $this->getEntityManager() ->flush();
28+ $entityManager ->flush();
2829 }
2930 }
3031
3132 public function remove(<?= $ entity_class_name ?> $entity, bool $flush = false): void
3233 {
33- $this->getEntityManager()->remove($entity);
34+ $entityManager = $this->getEntityManager();
35+ $entityManager->remove($entity);
3436
3537 if ($flush) {
36- $this->getEntityManager() ->flush();
38+ $entityManager ->flush();
3739 }
3840 }
3941<?php if ($ include_example_comments ): // When adding a new method without existing default comments, the blank line is automatically added. ?>
Original file line number Diff line number Diff line change @@ -23,19 +23,21 @@ public function __construct(ManagerRegistry $registry)
2323
2424 public function save (UserXml $ entity , bool $ flush = false ): void
2525 {
26- $ this ->getEntityManager ()->persist ($ entity );
26+ $ entityManager = $ this ->getEntityManager ();
27+ $ entityManager ->persist ($ entity );
2728
2829 if ($ flush ) {
29- $ this -> getEntityManager () ->flush ();
30+ $ entityManager ->flush ();
3031 }
3132 }
3233
3334 public function remove (UserXml $ entity , bool $ flush = false ): void
3435 {
35- $ this ->getEntityManager ()->remove ($ entity );
36+ $ entityManager = $ this ->getEntityManager ();
37+ $ entityManager ->remove ($ entity );
3638
3739 if ($ flush ) {
38- $ this -> getEntityManager () ->flush ();
40+ $ entityManager ->flush ();
3941 }
4042 }
4143
Original file line number Diff line number Diff line change @@ -23,19 +23,21 @@ public function __construct(ManagerRegistry $registry)
2323
2424 public function save (XOther $ entity , bool $ flush = false ): void
2525 {
26- $ this ->getEntityManager ()->persist ($ entity );
26+ $ entityManager = $ this ->getEntityManager ();
27+ $ entityManager ->persist ($ entity );
2728
2829 if ($ flush ) {
29- $ this -> getEntityManager () ->flush ();
30+ $ entityManager ->flush ();
3031 }
3132 }
3233
3334 public function remove (XOther $ entity , bool $ flush = false ): void
3435 {
35- $ this ->getEntityManager ()->remove ($ entity );
36+ $ entityManager = $ this ->getEntityManager ();
37+ $ entityManager ->remove ($ entity );
3638
3739 if ($ flush ) {
38- $ this -> getEntityManager () ->flush ();
40+ $ entityManager ->flush ();
3941 }
4042 }
4143
You can’t perform that action at this time.
0 commit comments