@@ -231,8 +231,8 @@ |
||
231 | 231 | } |
232 | 232 | |
233 | 233 | /** |
234 | - * @param $className |
|
235 | - * @param $annotationObj |
|
234 | + * @param string $className |
|
235 | + * @param BusinessEntity $annotationObj |
|
236 | 236 | * @param $businessProperties |
237 | 237 | * |
238 | 238 | * @return ORMBusinessEntity |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | 'attr' => [ |
75 | 75 | 'class' => 'add_'.$options['business_entity_id'].'_link picker_entity_select', |
76 | 76 | ], |
77 | - 'query_builder' => function (EntityRepository $er) use ($businessEntity, $locale) { |
|
77 | + 'query_builder' => function(EntityRepository $er) use ($businessEntity, $locale) { |
|
78 | 78 | // Don't display entities that don't have translations in the current locale. |
79 | 79 | if (in_array(Translatable::class, class_uses($businessEntity->getClass()))) { |
80 | 80 | return $er->createQueryBuilder('entity') |
@@ -90,11 +90,11 @@ discard block |
||
90 | 90 | |
91 | 91 | $builder->get('ressourceId')->addModelTransformer( |
92 | 92 | new CallbackTransformer( |
93 | - function ($idToEntity) use ($entityManager, $businessEntity) { |
|
93 | + function($idToEntity) use ($entityManager, $businessEntity) { |
|
94 | 94 | // transform the array to a string |
95 | 95 | return $entityManager->getRepository($businessEntity->getClass())->findOneById($idToEntity); |
96 | 96 | }, |
97 | - function ($entityToId) { |
|
97 | + function($entityToId) { |
|
98 | 98 | // transform the string back to an array |
99 | 99 | return $entityToId->getId(); |
100 | 100 | } |
@@ -30,10 +30,10 @@ |
||
30 | 30 | |
31 | 31 | $builder->addModelTransformer( |
32 | 32 | new CallbackTransformer( |
33 | - function ($businessEntity) { |
|
33 | + function($businessEntity) { |
|
34 | 34 | return $businessEntity; |
35 | 35 | }, |
36 | - function ($nameToBusinessEntity) use ($entityManager) { |
|
36 | + function($nameToBusinessEntity) use ($entityManager) { |
|
37 | 37 | return $entityManager->getRepository( |
38 | 38 | 'VictoireBusinessEntityBundle:BusinessEntity' |
39 | 39 | )->findOneByName( |