2020use DeviceDetector \DeviceDetector ;
2121use Doctrine \Common \Collections \ArrayCollection ;
2222use Doctrine \ORM \EntityManagerInterface ;
23+ use Doctrine \ORM \Mapping \AssociationMapping ;
2324use Doctrine \ORM \Mapping \ClassMetadata ;
2425use PHPUnit \Framework \Attributes \DataProvider ;
2526use PHPUnit \Framework \Attributes \TestDox ;
@@ -745,10 +746,10 @@ public static function dataProviderTestThatOneToManyAssociationMethodsWorksAsExp
745746 // Get entity class meta data
746747 $ meta = $ entityManager ->getClassMetadata (static ::$ entityName );
747748
748- $ iterator = static fn (array $ mapping ): array => [
749+ $ iterator = static fn (AssociationMapping $ mapping ): array => [
749750 [
750- 'get ' . ucfirst (( string ) $ mapping[ ' fieldName ' ] ),
751- $ mapping[ ' fieldName ' ] ,
751+ 'get ' . ucfirst ($ mapping-> fieldName ),
752+ $ mapping-> fieldName ,
752753 $ mapping ,
753754 ],
754755 ];
@@ -759,15 +760,15 @@ public static function dataProviderTestThatOneToManyAssociationMethodsWorksAsExp
759760
760761 $ items = array_filter (
761762 $ meta ->getAssociationMappings (),
762- static fn (array $ mapping ): bool => $ mapping[ ' type ' ] === ClassMetadata::ONE_TO_MANY ,
763+ static fn (AssociationMapping $ mapping ): bool => $ mapping-> type () === ClassMetadata::ONE_TO_MANY ,
763764 );
764765
765766 if (empty ($ items )) {
766767 $ output = [
767768 [null , null , []],
768769 ];
769770 } else {
770- $ output = array_merge (...array_values (array_map ($ iterator , ( array ) $ items )));
771+ $ output = array_merge (...array_values (array_map ($ iterator , $ items )));
771772 }
772773
773774 return $ output ;
0 commit comments