@@ -15,7 +15,7 @@ |
||
15 | 15 | assert($typeRef instanceof IEntityTypeReference); |
16 | 16 | |
17 | 17 | return null !== $typeRef->getDefinition() && !$typeRef->getDefinition()->getTypeKind()->isEntity() |
18 | - ? [ InterfaceValidator::createTypeRefInterfaceTypeKindValueMismatchError($typeRef) ] : null; |
|
18 | + ? [InterfaceValidator::createTypeRefInterfaceTypeKindValueMismatchError($typeRef)] : null; |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | public function forType(): string |
@@ -17,7 +17,7 @@ |
||
17 | 17 | $primitive = $typeRef->getDefinition(); |
18 | 18 | assert($primitive instanceof IPrimitiveType); |
19 | 19 | return null !== $typeRef->getDefinition() && !$primitive->getPrimitiveKind()->isBinary() |
20 | - ? [ InterfaceValidator::createTypeRefInterfaceTypeKindValueMismatchError($typeRef) ] : null; |
|
20 | + ? [InterfaceValidator::createTypeRefInterfaceTypeKindValueMismatchError($typeRef)] : null; |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | public function forType(): string |
@@ -17,7 +17,7 @@ |
||
17 | 17 | $references[] = $expression->getReferencedParameter(); |
18 | 18 | return null; |
19 | 19 | } else { |
20 | - return [ InterfaceValidator::createPropertyMustNotBeNullError($expression, 'ReferencedParameter') ]; |
|
20 | + return [InterfaceValidator::createPropertyMustNotBeNullError($expression, 'ReferencedParameter')]; |
|
21 | 21 | } |
22 | 22 | } |
23 | 23 |
@@ -14,7 +14,7 @@ |
||
14 | 14 | { |
15 | 15 | assert($typeRef instanceof IComplexTypeReference); |
16 | 16 | return null !== $typeRef->getDefinition() && !$typeRef->getDefinition()->getTypeKind()->isComplex() |
17 | - ? [ InterfaceValidator::createTypeRefInterfaceTypeKindValueMismatchError($typeRef) ] : null; |
|
17 | + ? [InterfaceValidator::createTypeRefInterfaceTypeKindValueMismatchError($typeRef)] : null; |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | public function forType(): string |
@@ -20,11 +20,11 @@ |
||
20 | 20 | } |
21 | 21 | public static function getCycleSentinel(): ?stdClass |
22 | 22 | { |
23 | - return (object)[]; |
|
23 | + return (object) []; |
|
24 | 24 | } |
25 | 25 | public static function getSecondPassCycleSentinel(): ?stdClass |
26 | 26 | { |
27 | - return (object)[]; |
|
27 | + return (object) []; |
|
28 | 28 | } |
29 | 29 | public static function getBoxed(bool $value) |
30 | 30 | { |
@@ -36,6 +36,6 @@ |
||
36 | 36 | public function primitiveKind(): PrimitiveTypeKind |
37 | 37 | { |
38 | 38 | $primitive = $this->primitiveDefinition(); |
39 | - return $primitive !== null ? $primitive->getPrimitiveKind(): PrimitiveTypeKind::None(); |
|
39 | + return $primitive !== null ? $primitive->getPrimitiveKind() : PrimitiveTypeKind::None(); |
|
40 | 40 | } |
41 | 41 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | case $element instanceof IProperty: |
54 | 54 | assert($element instanceof IProperty); |
55 | 55 | $type = $element->getType(); |
56 | - return $element->getName() ?? '' . ':' . ($type !== null ? self::toTraceString($type) :''); |
|
56 | + return $element->getName() ?? '' . ':' . ($type !== null ? self::toTraceString($type) : ''); |
|
57 | 57 | case $element instanceof IEntityReferenceType: |
58 | 58 | assert($element instanceof IEntityReferenceType); |
59 | 59 | return strval(TypeKind::EntityReference()->getKey()) . '(' . (null !== $element->getEntityType() ? |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | $sb, |
189 | 189 | EdmConstants::FacetName_Srid, |
190 | 190 | null !== $type->getSpatialReferenceIdentifier() |
191 | - ? $type->getSpatialReferenceIdentifier(): EdmConstants::Value_SridVariable |
|
191 | + ? $type->getSpatialReferenceIdentifier() : EdmConstants::Value_SridVariable |
|
192 | 192 | ); |
193 | 193 | return $sb; |
194 | 194 | } |
@@ -94,8 +94,8 @@ |
||
94 | 94 | $errors = [new EdmError(new CsdlLocation(0, 0), EdmErrorCode::UnknownEdmxVersion(), StringConst::Serializer_UnknownEdmxVersion())]; |
95 | 95 | return false; |
96 | 96 | } |
97 | - } elseif (! $edmxVersion = CsdlConstants::edmToEdmxVersions($model->getEdmVersion() ?? Version::v3())) { |
|
98 | - $errors = [new EdmError(new CsdlLocation(0, 0), EdmErrorCode::UnknownEdmVersion(), StringConst::Serializer_UnknownEdmVersion()) ]; |
|
97 | + } elseif (!$edmxVersion = CsdlConstants::edmToEdmxVersions($model->getEdmVersion() ?? Version::v3())) { |
|
98 | + $errors = [new EdmError(new CsdlLocation(0, 0), EdmErrorCode::UnknownEdmVersion(), StringConst::Serializer_UnknownEdmVersion())]; |
|
99 | 99 | return false; |
100 | 100 | } |
101 | 101 |
@@ -1351,8 +1351,7 @@ discard block |
||
1351 | 1351 | */ |
1352 | 1352 | public function writeOptionalAttribute(string $attribute, $value, $defaultValue, callable $toXml): void |
1353 | 1353 | { |
1354 | - $stem = is_array($toXml) ? new ReflectionMethod(...$toXml) : |
|
1355 | - new ReflectionFunction($toXml); |
|
1354 | + $stem = is_array($toXml) ? new ReflectionMethod(...$toXml) : new ReflectionFunction($toXml); |
|
1356 | 1355 | /* @noinspection PhpUnhandledExceptionInspection suppressing exceptions for asserts.*/ |
1357 | 1356 | assert( |
1358 | 1357 | 1 === count(($stem)->getParameters()), |
@@ -1360,8 +1359,7 @@ discard block |
||
1360 | 1359 | ); |
1361 | 1360 | $stemType = $stem->getReturnType(); |
1362 | 1361 | $name = $stemType instanceof ReflectionNamedType ? |
1363 | - $stemType->getName() : |
|
1364 | - strval($stemType); |
|
1362 | + $stemType->getName() : strval($stemType); |
|
1365 | 1363 | /* @noinspection PhpUnhandledExceptionInspection suppressing exceptions for asserts.*/ |
1366 | 1364 | assert( |
1367 | 1365 | 'string' === $name, |
@@ -1380,8 +1378,7 @@ discard block |
||
1380 | 1378 | */ |
1381 | 1379 | public function writeRequiredAttribute(string $attribute, $value, callable $toXml): void |
1382 | 1380 | { |
1383 | - $stem = is_array($toXml) ? new ReflectionMethod(...$toXml) : |
|
1384 | - new ReflectionFunction($toXml); |
|
1381 | + $stem = is_array($toXml) ? new ReflectionMethod(...$toXml) : new ReflectionFunction($toXml); |
|
1385 | 1382 | /* @noinspection PhpUnhandledExceptionInspection suppressing exceptions for asserts.*/ |
1386 | 1383 | assert( |
1387 | 1384 | 1 === count($stem->getParameters()), |
@@ -1389,8 +1386,7 @@ discard block |
||
1389 | 1386 | ); |
1390 | 1387 | $stemType = $stem->getReturnType(); |
1391 | 1388 | $name = $stemType instanceof ReflectionNamedType ? |
1392 | - $stemType->getName() : |
|
1393 | - strval($stemType); |
|
1389 | + $stemType->getName() : strval($stemType); |
|
1394 | 1390 | /* @noinspection PhpUnhandledExceptionInspection suppressing exceptions for asserts.*/ |
1395 | 1391 | assert( |
1396 | 1392 | 'string' === $name, |
@@ -1487,7 +1483,7 @@ discard block |
||
1487 | 1483 | |
1488 | 1484 | private static function sridAsXml(?int $i): string |
1489 | 1485 | { |
1490 | - return $i !== null ? strval($i) : CsdlConstants::Value_SridVariable; |
|
1486 | + return $i !== null ? strval($i) : CsdlConstants::Value_SridVariable; |
|
1491 | 1487 | } |
1492 | 1488 | |
1493 | 1489 | /** |