@@ -537,7 +537,7 @@ public function testAssociationManyToManyOwning(): void
537537 // $author1 and $author2 are not tested (because reverse side)
538538 }
539539
540- protected function createSubClass (int $ id , Initializer1 $ firstInitializer = null , Initializer2 $ secondInitializer = null ): SubClass
540+ protected function createSubClass (int $ id , ? Initializer1 $ firstInitializer = null , ? Initializer2 $ secondInitializer = null ): SubClass
541541 {
542542 $ object = new MyObject ();
543543 $ object ->hello = 'world ' .$ id ;
@@ -563,7 +563,7 @@ protected function createSubClass(int $id, Initializer1 $firstInitializer = null
563563 return $ subClass ;
564564 }
565565
566- protected function createInitializer1 (int $ suffix , SubClass $ sub = null ): Initializer1
566+ protected function createInitializer1 (int $ suffix , ? SubClass $ sub = null ): Initializer1
567567 {
568568 $ firstInitializer = new Initializer1 ();
569569 $ firstInitializer ->setName ('Initializer1 name ' .$ suffix );
@@ -575,7 +575,7 @@ protected function createInitializer1(int $suffix, SubClass $sub = null): Initia
575575 return $ firstInitializer ;
576576 }
577577
578- protected function createInitializer2 (Author $ author = null ): Initializer2
578+ protected function createInitializer2 (? Author $ author = null ): Initializer2
579579 {
580580 $ secondInitializer = new Initializer2 ();
581581 if ($ author ) {
@@ -586,7 +586,7 @@ protected function createInitializer2(Author $author = null): Initializer2
586586 return $ secondInitializer ;
587587 }
588588
589- protected function createBook (int $ suffix , Category $ category = null , Author $ author = null ): Book
589+ protected function createBook (int $ suffix , ? Category $ category = null , ? Author $ author = null ): Book
590590 {
591591 $ book = new Book ();
592592 $ book ->setTitle ('Title ' .$ suffix )
@@ -602,7 +602,7 @@ protected function createBook(int $suffix, Category $category = null, Author $au
602602 return $ book ;
603603 }
604604
605- protected function createCategory (int $ id , Book $ book = null ): Category
605+ protected function createCategory (int $ id , ? Book $ book = null ): Category
606606 {
607607 $ category = new Category ();
608608 $ category ->setCategoryId ($ id )
@@ -616,7 +616,7 @@ protected function createCategory(int $id, Book $book = null): Category
616616 return $ category ;
617617 }
618618
619- protected function createAuthor (int $ id , Book $ book = null ): Author
619+ protected function createAuthor (int $ id , ? Book $ book = null ): Author
620620 {
621621 $ author = new Author ();
622622 $ author ->setAuthorId ($ id )
0 commit comments