@@ -115,6 +115,9 @@ discard block |
||
| 115 | 115 | return array_shift($identifier); |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | + /** |
|
| 119 | + * @param string $attribute |
|
| 120 | + */ |
|
| 118 | 121 | private function getObjectMetadata($object, $attribute) |
| 119 | 122 | { |
| 120 | 123 | $class = get_class($object); |
@@ -132,6 +135,9 @@ discard block |
||
| 132 | 135 | return $metadata; |
| 133 | 136 | } |
| 134 | 137 | |
| 138 | + /** |
|
| 139 | + * @param string $attribute |
|
| 140 | + */ |
|
| 135 | 141 | private function getAssocMetadata(ClassMetadataInterface $metadata, $attribute) |
| 136 | 142 | { |
| 137 | 143 | $assoc = $metadata->getAssociationTargetClass($attribute); |
@@ -139,9 +139,9 @@ |
||
| 139 | 139 | |
| 140 | 140 | if (null === $assocManager) { |
| 141 | 141 | throw new \LogicException($metadata->getName() . |
| 142 | - '::$' . |
|
| 143 | - $attribute . |
|
| 144 | - ' references non-existent managed entity'); |
|
| 142 | + '::$' . |
|
| 143 | + $attribute . |
|
| 144 | + ' references non-existent managed entity'); |
|
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | return $assocManager->getClassMetadata($assoc); |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | $handler->setArguments([new Reference('doctrine')]); |
| 34 | 34 | |
| 35 | 35 | $container->getDefinition('serializer.normalizer.object') |
| 36 | - ->addMethodCall('setCircularReferenceHandler', [[$handler, 'handle']]); |
|
| 36 | + ->addMethodCall('setCircularReferenceHandler', [[$handler, 'handle']]); |
|
| 37 | 37 | |
| 38 | 38 | $normalizer = new DefinitionDecorator('serializer.normalizer.object'); |
| 39 | 39 | $normalizer->setClass(DoctrineObjectNormalizer::class); |