@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $this->metadata = $container->get(Metadata::class); |
| 62 | 62 | $this->typeManager = $container->get(TypeManager::class); |
| 63 | 63 | |
| 64 | - if (! isset($this->metadata->getMetadataConfig()[$typeName])) { |
|
| 64 | + if (!isset($this->metadata->getMetadataConfig()[$typeName])) { |
|
| 65 | 65 | throw new Error( |
| 66 | 66 | 'Entity ' . $typeName . ' is not mapped in the metadata', |
| 67 | 67 | ); |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | return $this->metadataConfig['typeName']; |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | - public function getDescription(): string|null |
|
| 88 | + public function getDescription(): string | null |
|
| 89 | 89 | { |
| 90 | 90 | return $this->metadataConfig['description']; |
| 91 | 91 | } |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | $classMetadata = $this->entityManager->getClassMetadata($this->getEntityClass()); |
| 145 | 145 | |
| 146 | 146 | foreach ($classMetadata->getFieldNames() as $fieldName) { |
| 147 | - if (! in_array($fieldName, array_keys($this->metadataConfig['fields']))) { |
|
| 147 | + if (!in_array($fieldName, array_keys($this->metadataConfig['fields']))) { |
|
| 148 | 148 | continue; |
| 149 | 149 | } |
| 150 | 150 | |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | $classMetadata = $this->entityManager->getClassMetadata($this->getEntityClass()); |
| 163 | 163 | |
| 164 | 164 | foreach ($classMetadata->getAssociationNames() as $associationName) { |
| 165 | - if (! in_array($associationName, array_keys($this->metadataConfig['fields']))) { |
|
| 165 | + if (!in_array($associationName, array_keys($this->metadataConfig['fields']))) { |
|
| 166 | 166 | continue; |
| 167 | 167 | } |
| 168 | 168 | |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | case ClassMetadataInfo::MANY_TO_ONE: |
| 174 | 174 | case ClassMetadataInfo::TO_ONE: |
| 175 | 175 | $targetEntity = $associationMetadata['targetEntity']; |
| 176 | - $fields[$associationName] = function () use ($targetEntity) { |
|
| 176 | + $fields[$associationName] = function() use ($targetEntity) { |
|
| 177 | 177 | $entity = $this->typeManager->build(self::class, $targetEntity); |
| 178 | 178 | |
| 179 | 179 | return [ |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | case ClassMetadataInfo::MANY_TO_MANY: |
| 187 | 187 | case ClassMetadataInfo::TO_MANY: |
| 188 | 188 | $targetEntity = $associationMetadata['targetEntity']; |
| 189 | - $fields[$associationName] = function () use ($targetEntity, $associationName) { |
|
| 189 | + $fields[$associationName] = function() use ($targetEntity, $associationName) { |
|
| 190 | 190 | $entity = $this->typeManager->build(self::class, $targetEntity); |
| 191 | 191 | $shortName = $this->getTypeName() . '_' . $associationName; |
| 192 | 192 | |
@@ -10,11 +10,11 @@ |
||
| 10 | 10 | { |
| 11 | 11 | public function __construct( |
| 12 | 12 | protected AbstractContainer $container, |
| 13 | - protected array|null $metadataConfig, |
|
| 13 | + protected array | null $metadataConfig, |
|
| 14 | 14 | ) { |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | - public function getMetadataConfig(): array|null |
|
| 17 | + public function getMetadataConfig(): array | null |
|
| 18 | 18 | { |
| 19 | 19 | return $this->metadataConfig; |
| 20 | 20 | } |