@@ -44,7 +44,7 @@ |
||
44 | 44 | * @var IVocabularyAnnotation $annotation |
45 | 45 | */ |
46 | 46 | $annotation = $this; |
47 | - $model->SetAnnotationValue($annotation, EdmConstants::InternalUri, CsdlConstants::AnnotationSerializationLocationAnnotation, (object)$location); |
|
47 | + $model->SetAnnotationValue($annotation, EdmConstants::InternalUri, CsdlConstants::AnnotationSerializationLocationAnnotation, (object) $location); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | /** |
@@ -38,6 +38,6 @@ |
||
38 | 38 | public function PrimitiveKind(): PrimitiveTypeKind |
39 | 39 | { |
40 | 40 | $primitive = $this->PrimitiveDefinition(); |
41 | - return $primitive !== null ? $primitive->getPrimitiveKind(): PrimitiveTypeKind::None(); |
|
41 | + return $primitive !== null ? $primitive->getPrimitiveKind() : PrimitiveTypeKind::None(); |
|
42 | 42 | } |
43 | 43 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | // Otherwise, changes to the dictionary durring serialization would result in an invalid or inconsistent output. |
43 | 43 | public function GetNamespaceAliases(): array |
44 | 44 | { |
45 | - return $this->GetAnnotationValue('array', $this, EdmConstants::InternalUri, CsdlConstants::NamespaceAliasAnnotation) ??[]; |
|
45 | + return $this->GetAnnotationValue('array', $this, EdmConstants::InternalUri, CsdlConstants::NamespaceAliasAnnotation) ?? []; |
|
46 | 46 | } |
47 | 47 | /** |
48 | 48 | * Sets an annotation value for an EDM element. If the value is null, no annotation is added and an existing |
@@ -95,12 +95,12 @@ discard block |
||
95 | 95 | private function FindAcrossModels(string $qualifiedName, callable $finder, callable $ambiguousCreator) |
96 | 96 | { |
97 | 97 | $model = $this; |
98 | - Asserts::assertSignatureMatches(function(IModel $model, string $qualifiedName){}, $finder, '$finder'); |
|
99 | - Asserts::assertSignatureMatches(function($candidate, $fromReference){}, $ambiguousCreator, '$ambiguousCreator'); |
|
98 | + Asserts::assertSignatureMatches(function (IModel $model, string $qualifiedName) {}, $finder, '$finder'); |
|
99 | + Asserts::assertSignatureMatches(function ($candidate, $fromReference) {}, $ambiguousCreator, '$ambiguousCreator'); |
|
100 | 100 | $candidate = $finder($model, $qualifiedName); |
101 | - foreach($model->getReferencedModels() as $reference){ |
|
101 | + foreach ($model->getReferencedModels() as $reference) { |
|
102 | 102 | $fromReference = $finder($reference, $qualifiedName); |
103 | - if($fromReference !== null){ |
|
103 | + if ($fromReference !== null) { |
|
104 | 104 | $candidate = $candidate === null ? $fromReference : $ambiguousCreator($candidate, $fromReference); |
105 | 105 | } |
106 | 106 | } |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | { |
134 | 134 | EdmUtil::CheckArgumentNull($qualifiedName, "qualifiedName"); |
135 | 135 | |
136 | - return $this->FindAcrossModels( $qualifiedName, self::ValueTermFinder(), [RegistrationHelper::class, 'CreateAmbiguousValueTermBinding']); |
|
136 | + return $this->FindAcrossModels($qualifiedName, self::ValueTermFinder(), [RegistrationHelper::class, 'CreateAmbiguousValueTermBinding']); |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | */ |
248 | 248 | public function GetNamespacePrefixMappings(): array |
249 | 249 | { |
250 | - return $this->GetAnnotationValue('array', $this, EdmConstants::InternalUri, CsdlConstants::NamespacePrefixAnnotation)??[]; |
|
250 | + return $this->GetAnnotationValue('array', $this, EdmConstants::InternalUri, CsdlConstants::NamespacePrefixAnnotation) ?? []; |
|
251 | 251 | } |
252 | 252 | |
253 | 253 | |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | $navigationPropertyMappings = $model->GetAnnotationValue(SplObjectStorage::class, $entitySet, EdmConstants::InternalUri, CsdlConstants::AssociationSetNameAnnotation); |
400 | 400 | assert($navigationPropertyMappings instanceof SplObjectStorage || $navigationPropertyMappings === null); |
401 | 401 | if ($navigationPropertyMappings !== null && $navigationPropertyMappings->offsetExists($property)) { |
402 | - $associationSetName = $navigationPropertyMappings->offsetGet($property) ; |
|
402 | + $associationSetName = $navigationPropertyMappings->offsetGet($property); |
|
403 | 403 | } else { |
404 | 404 | $associationSetName = $model->GetAssociationName($property) . 'Set'; |
405 | 405 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | case $element instanceof IProperty: |
50 | 50 | assert($element instanceof IProperty); |
51 | 51 | $type = $element->getType(); |
52 | - return $element->getName() ?? '' . ':' . ($type !== null ? self::ToTraceString($type) :''); |
|
52 | + return $element->getName() ?? '' . ':' . ($type !== null ? self::ToTraceString($type) : ''); |
|
53 | 53 | case $element instanceof IEntityReferenceType: |
54 | 54 | assert($element instanceof IEntityReferenceType); |
55 | 55 | return TypeKind::EntityReference()->getKey() . '(' . ($element->getEntityType() !== null ? self::ToTraceString($element->getEntityType()) : '') . ')'; |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | |
167 | 167 | private static function AppendSpatialFacets(string $sb, ISpatialTypeReference $type): string |
168 | 168 | { |
169 | - $sb = self::AppendKeyValue($sb, EdmConstants::FacetName_Srid, $type->getSpatialReferenceIdentifier() != null ? $type->getSpatialReferenceIdentifier(): EdmConstants::Value_SridVariable); |
|
169 | + $sb = self::AppendKeyValue($sb, EdmConstants::FacetName_Srid, $type->getSpatialReferenceIdentifier() != null ? $type->getSpatialReferenceIdentifier() : EdmConstants::Value_SridVariable); |
|
170 | 170 | return $sb; |
171 | 171 | } |
172 | 172 |
@@ -116,7 +116,7 @@ |
||
116 | 116 | protected function endElement(IEdmElement $element, string $method): void |
117 | 117 | { |
118 | 118 | $method = $this->sanitizeMethodName($method); |
119 | - $elementClone = $this->cloneElementContainer->offsetGet($element); |
|
119 | + $elementClone = $this->cloneElementContainer->offsetGet($element); |
|
120 | 120 | foreach ($this->visitors as $visitor) { |
121 | 121 | $visitor->{'end' . $method}($elementClone); |
122 | 122 | } |