Skip to content

Commit 837f7a8

Browse files
committed
minor #53756 [DoctrineBridge] fix syntax errors on PHP 7 (xabbuh)
This PR was merged into the 5.4 branch. Discussion ---------- [DoctrineBridge] fix syntax errors on PHP 7 | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | | License | MIT I missed this when rebasing #53754 on the `5.4` branch Commits ------- 42d6424 fix syntax errors on PHP 7
2 parents ff5dc26 + 42d6424 commit 837f7a8

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,12 @@ private static function getRealClass(string $class): string
200200
return substr($class, $pos + Proxy::MARKER_LENGTH + 2);
201201
}
202202

203-
private static function getMappingValue(array|JoinColumnMapping $mapping, string $key): mixed
203+
/**
204+
* @param array|JoinColumnMapping $mapping
205+
*
206+
* @return mixed
207+
*/
208+
private static function getMappingValue($mapping, string $key)
204209
{
205210
if ($mapping instanceof JoinColumnMapping) {
206211
return $mapping->$key;

src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,12 @@ private function getPhpType(string $doctrineType): ?string
306306
return null;
307307
}
308308

309-
private static function getMappingValue(array|AssociationMapping|EmbeddedClassMapping|FieldMapping|JoinColumnMapping $mapping, string $key): mixed
309+
/**
310+
* @param array|AssociationMapping|EmbeddedClassMapping|FieldMapping|JoinColumnMapping $mapping
311+
*
312+
* @return mixed
313+
*/
314+
private static function getMappingValue($mapping, string $key)
310315
{
311316
if ($mapping instanceof AssociationMapping || $mapping instanceof EmbeddedClassMapping || $mapping instanceof FieldMapping || $mapping instanceof JoinColumnMapping) {
312317
return $mapping->$key;

src/Symfony/Bridge/Doctrine/Validator/DoctrineLoader.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,12 @@ private function getExistingUniqueFields(ClassMetadata $metadata): array
140140
return $fields;
141141
}
142142

143-
private static function getFieldMappingValue(array|FieldMapping $mapping, string $key): mixed
143+
/**
144+
* @param array|FieldMapping $mapping
145+
*
146+
* @return mixed
147+
*/
148+
private static function getFieldMappingValue($mapping, string $key)
144149
{
145150
if ($mapping instanceof FieldMapping) {
146151
return $mapping->$key;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy