@@ -66,46 +66,46 @@ public function testCountObjectsInUnitOfWork(): void
6666 /** @var Book $book */
6767 $ book = $ this ->em ->getRepository (Book::class)->find (6 );
6868 $ this ->assertNotNull ($ book );
69- $ this ->assertEquals (2 , $ this ->countObjectsInUnitOfWork ()); //Book + category (lazy association)
69+ $ this ->assertEquals (2 , $ this ->countObjectsInUnitOfWork ()); // Book + category (lazy association)
7070
7171 $ categoryName = $ book ->getCategory ()->getName ();
72- $ this ->assertEquals (2 , $ this ->countObjectsInUnitOfWork ()); //Nothing new
72+ $ this ->assertEquals (2 , $ this ->countObjectsInUnitOfWork ()); // Nothing new
7373
7474 $ authors = $ book ->getAuthors ();
75- $ this ->assertEquals (2 , $ this ->countObjectsInUnitOfWork ()); //Nothing new
75+ $ this ->assertEquals (2 , $ this ->countObjectsInUnitOfWork ()); // Nothing new
7676
7777 $ firstLastName = $ authors ->first ()->getFirstName ();
78- $ this ->assertEquals (5 , $ this ->countObjectsInUnitOfWork ()); //+ 3 authors (lazy association collection - collection is populated the first time its accessed)
78+ $ this ->assertEquals (5 , $ this ->countObjectsInUnitOfWork ()); // + 3 authors (lazy association collection - collection is populated the first time its accessed)
7979
8080 $ this ->em ->clear ();
8181 $ this ->assertEquals (0 , $ this ->countObjectsInUnitOfWork ());
8282
8383 /** @var Author $author */
8484 $ author = $ this ->em ->getRepository (Author::class)->find (4 );
8585 $ this ->assertNotNull ($ author );
86- $ this ->assertEquals (1 , $ this ->countObjectsInUnitOfWork ()); //Author
86+ $ this ->assertEquals (1 , $ this ->countObjectsInUnitOfWork ()); // Author
8787
8888 $ books = $ author ->getBooks ();
89- $ this ->assertEquals (1 , $ this ->countObjectsInUnitOfWork ()); //Nothing new
89+ $ this ->assertEquals (1 , $ this ->countObjectsInUnitOfWork ()); // Nothing new
9090
9191 $ firstTitle = $ books ->first ()->getTitle ();
92- $ this ->assertEquals (7 , $ this ->countObjectsInUnitOfWork ()); //+ 4 books (lazy association collection) + 2 categories
92+ $ this ->assertEquals (7 , $ this ->countObjectsInUnitOfWork ()); // + 4 books (lazy association collection) + 2 categories
9393
9494 $ firstCategoryName = $ book ->getCategory ()->getName ();
95- $ this ->assertEquals (7 , $ this ->countObjectsInUnitOfWork ()); //Nothing new
95+ $ this ->assertEquals (7 , $ this ->countObjectsInUnitOfWork ()); // Nothing new
9696
9797 $ this ->em ->clear ();
9898 $ this ->assertEquals (0 , $ this ->countObjectsInUnitOfWork ());
9999
100100 $ book1Sales = $ this ->em ->getRepository (Sale::class)->findBy (['book ' => 1 ]);
101101 $ this ->assertCount (2 , $ book1Sales );
102- $ this ->assertEquals (3 , $ this ->countObjectsInUnitOfWork ()); //2 sales + 1 book
102+ $ this ->assertEquals (3 , $ this ->countObjectsInUnitOfWork ()); // 2 sales + 1 book
103103
104104 $ book = $ book1Sales [0 ]->getBook ();
105- $ this ->assertEquals (3 , $ this ->countObjectsInUnitOfWork ()); //Nothing new
105+ $ this ->assertEquals (3 , $ this ->countObjectsInUnitOfWork ()); // Nothing new
106106
107107 $ category = $ book ->getCategory ();
108- $ this ->assertEquals (4 , $ this ->countObjectsInUnitOfWork ()); //+ category
108+ $ this ->assertEquals (4 , $ this ->countObjectsInUnitOfWork ()); // + category
109109 }
110110
111111 public function testCreate (): void
@@ -295,12 +295,12 @@ public function testInIterate($useRefetchObjectMethod): void
295295 {
296296 $ entityManager = $ this ->em ;
297297
298- //Example in README.md - Beginning
298+ // Example in README.md - Beginning
299299
300300 $ refetchManager = RefetchManager::create ($ entityManager );
301301
302302 $ author = $ entityManager ->getRepository (Author::class)->find (1 );
303- $ this ->assertNotNull ($ author ); //Remove this line in Example
303+ $ this ->assertNotNull ($ author ); // Remove this line in Example
304304
305305 $ queryBuilder = $ entityManager ->getRepository (Book::class)->createQueryBuilder ('b ' );
306306 $ queryBuilder ->select ('b ' )
@@ -319,25 +319,25 @@ public function testInIterate($useRefetchObjectMethod): void
319319 }
320320
321321 if (0 === $ i % 2 ) {
322- //$author is managed
322+ // $author is managed
323323 $ entityManager ->flush ();
324324 $ entityManager ->clear ();
325- //$author is not managed
326- $ this ->assertEquals (0 , $ this ->countObjectsInUnitOfWork ()); //Remove this line in Example
327- if ($ useRefetchObjectMethod ) { //Remove this line in Example
328- $ refetchManager ->refetchObject ($ author ); //Remove this line in Example
329- } else { //Remove this line in Example
325+ // $author is not managed
326+ $ this ->assertEquals (0 , $ this ->countObjectsInUnitOfWork ()); // Remove this line in Example
327+ if ($ useRefetchObjectMethod ) { // Remove this line in Example
328+ $ refetchManager ->refetchObject ($ author ); // Remove this line in Example
329+ } else { // Remove this line in Example
330330 $ author = $ refetchManager ->getObject ($ author );
331- } //Remove this line in Example
332- //$author is managed
333- $ this ->assertEquals (1 , $ this ->countObjectsInUnitOfWork ()); //Remove this line in Example
331+ } // Remove this line in Example
332+ // $author is managed
333+ $ this ->assertEquals (1 , $ this ->countObjectsInUnitOfWork ()); // Remove this line in Example
334334 }
335335 }
336336
337337 $ entityManager ->flush ();
338338 $ entityManager ->clear ();
339339
340- //Example in README.md - End
340+ // Example in README.md - End
341341
342342 /** @var QueryBuilder $queryBuilder */
343343 $ queryBuilder = $ this ->em ->getRepository (Book::class)->createQueryBuilder ('b ' );
@@ -407,7 +407,7 @@ public function testIndirectRefetch($useRefetchObjectMethod): void
407407 $ author ->setLastName ('My new last name ' );
408408 $ this ->em ->flush ($ author );
409409
410- $ countAuthors = $ book ->getAuthors ()->count (); //(lazy association collection
410+ $ countAuthors = $ book ->getAuthors ()->count (); // (lazy association collection
411411 $ author ->setLastName ('My new last name ' );
412412 $ this ->em ->flush ($ author );
413413 $ this ->checkUnitOfWork (2 , [$ book , $ author ]);
@@ -515,14 +515,14 @@ public function testGetCollectionFromCriteriaInIterate(): void
515515 {
516516 $ entityManager = $ this ->em ;
517517
518- //Example in README.md - Beginning
518+ // Example in README.md - Beginning
519519
520520 $ refetchManager = RefetchManager::create ($ entityManager );
521521
522522 $ ctiteria = Criteria::create ()
523523 ->andWhere (Criteria::expr ()->gt ('authorId ' , 2 ));
524524 $ authors = $ refetchManager ->getCollectionFromCriteria ($ ctiteria , Author::class);
525- $ this ->assertCount (2 , $ authors ); //Remove this line in Example
525+ $ this ->assertCount (2 , $ authors ); // Remove this line in Example
526526
527527 $ queryBuilder = $ entityManager ->getRepository (Book::class)->createQueryBuilder ('b ' );
528528 $ queryBuilder ->select ('b ' )
@@ -546,14 +546,14 @@ public function testGetCollectionFromCriteriaInIterate(): void
546546 $ entityManager ->flush ();
547547 $ entityManager ->clear ();
548548 $ authors = $ refetchManager ->getCollectionFromCriteria ($ ctiteria , Author::class);
549- $ this ->assertEquals (0 , $ this ->countObjectsInUnitOfWork ()); //Remove this line in Example
549+ $ this ->assertEquals (0 , $ this ->countObjectsInUnitOfWork ()); // Remove this line in Example
550550 }
551551 }
552552
553553 $ entityManager ->flush ();
554554 $ entityManager ->clear ();
555555
556- //Example in README.md - End
556+ // Example in README.md - End
557557
558558 /** @var QueryBuilder $queryBuilder */
559559 $ queryBuilder = $ this ->em ->getRepository (Book::class)->createQueryBuilder ('b ' );
0 commit comments