@@ -12,11 +12,11 @@ discard block |
||
12 | 12 | /** |
13 | 13 | * @var IDirectValueAnnotation |
14 | 14 | */ |
15 | - public $Annotations ; |
|
15 | + public $Annotations; |
|
16 | 16 | /** |
17 | 17 | * @var IDirectValueAnnotation |
18 | 18 | */ |
19 | - public $End1Annotations ; |
|
19 | + public $End1Annotations; |
|
20 | 20 | /** |
21 | 21 | * @var IDirectValueAnnotation |
22 | 22 | */ |
@@ -24,5 +24,5 @@ discard block |
||
24 | 24 | /** |
25 | 25 | * @var IDirectValueAnnotation |
26 | 26 | */ |
27 | - public $ConstraintAnnotations ; |
|
27 | + public $ConstraintAnnotations; |
|
28 | 28 | } |
@@ -1293,7 +1293,7 @@ discard block |
||
1293 | 1293 | |
1294 | 1294 | // Association Set |
1295 | 1295 | if (!($this->model->GetAssociationSetName($thisEntitySet, $thisNavprop) == |
1296 | - $this->model->GetAssociationSetName($thatEntitySet, $thatNavprop) && |
|
1296 | + $this->model->GetAssociationSetName($thatEntitySet, $thatNavprop) && |
|
1297 | 1297 | $this->model->GetAssociationFullName($thisNavprop) == $this->model->GetAssociationFullName($thatNavprop))) { |
1298 | 1298 | return false; |
1299 | 1299 | } |
@@ -1318,7 +1318,7 @@ discard block |
||
1318 | 1318 | } |
1319 | 1319 | |
1320 | 1320 | if (!($this->model->GetAssociationEndName($thisNavprop->getPartner()) == |
1321 | - $this->model->GetAssociationEndName($thatNavprop->getPartner()) && |
|
1321 | + $this->model->GetAssociationEndName($thatNavprop->getPartner()) && |
|
1322 | 1322 | $thisOtherEntitySet->getName() == $thatOtherEntitySet->getName())) { |
1323 | 1323 | return false; |
1324 | 1324 | } |
@@ -131,8 +131,7 @@ discard block |
||
131 | 131 | $alias = null; |
132 | 132 | if ($this->namespaceAliasMappings != null) { |
133 | 133 | $alias = array_key_exists($element->getNamespace(), $this->namespaceAliasMappings) ? |
134 | - $this->namespaceAliasMappings[$element->getNamespace()] : |
|
135 | - null; |
|
134 | + $this->namespaceAliasMappings[$element->getNamespace()] : null; |
|
136 | 135 | } |
137 | 136 | |
138 | 137 | $this->schemaWriter->WriteSchemaElementHeader($element, $alias, $mappings); |
@@ -602,7 +601,7 @@ discard block |
||
602 | 601 | protected function ProcessPropertyReferenceExpression(IPropertyReferenceExpression $expression): void |
603 | 602 | { |
604 | 603 | $this->BeginElement($expression, [$this->schemaWriter, 'WritePropertyReferenceExpressionElementHeader']); |
605 | - if ($expression->getBase()!= null) { |
|
604 | + if ($expression->getBase() != null) { |
|
606 | 605 | $this->VisitExpression($expression->getBase()); |
607 | 606 | } |
608 | 607 | |
@@ -933,7 +932,7 @@ discard block |
||
933 | 932 | /** |
934 | 933 | * @var IDirectValueAnnotation[] $end2Annotations |
935 | 934 | */ |
936 | - $end2Annotations =[]; |
|
935 | + $end2Annotations = []; |
|
937 | 936 | $this->model->GetAssociationSetAnnotations( |
938 | 937 | $entitySet, |
939 | 938 | $property, |
@@ -1208,10 +1207,10 @@ discard block |
||
1208 | 1207 | return false; |
1209 | 1208 | } |
1210 | 1209 | |
1211 | - $thisAssociationAnnotations =[]; |
|
1210 | + $thisAssociationAnnotations = []; |
|
1212 | 1211 | $thisEnd1Annotations = []; |
1213 | - $thisEnd2Annotations =[]; |
|
1214 | - $thisConstraintAnnotations =[]; |
|
1212 | + $thisEnd2Annotations = []; |
|
1213 | + $thisConstraintAnnotations = []; |
|
1215 | 1214 | $this->model->GetAssociationAnnotations( |
1216 | 1215 | $thisPrimary, |
1217 | 1216 | $thisAssociationAnnotations, |
@@ -1223,7 +1222,7 @@ discard block |
||
1223 | 1222 | $thatAssociationAnnotations = []; |
1224 | 1223 | $thatEnd1Annotations = []; |
1225 | 1224 | $thatEnd2Annotations = []; |
1226 | - $thatConstraintAnnotations =[]; |
|
1225 | + $thatConstraintAnnotations = []; |
|
1227 | 1226 | $this->model->GetAssociationAnnotations( |
1228 | 1227 | $thatPrimary, |
1229 | 1228 | $thatAssociationAnnotations, |
@@ -1337,8 +1336,8 @@ discard block |
||
1337 | 1336 | ); |
1338 | 1337 | |
1339 | 1338 | $thatAssociationSetAnnotations = []; |
1340 | - $thatEnd1Annotations =[]; |
|
1341 | - $thatEnd2Annotations =[]; |
|
1339 | + $thatEnd1Annotations = []; |
|
1340 | + $thatEnd2Annotations = []; |
|
1342 | 1341 | $this->model->GetAssociationSetAnnotations( |
1343 | 1342 | $thatEntitySet, |
1344 | 1343 | $thatNavprop, |
@@ -91,8 +91,8 @@ |
||
91 | 91 | $errors = [new EdmError(new CsdlLocation(0, 0), EdmErrorCode::UnknownEdmxVersion(), StringConst::Serializer_UnknownEdmxVersion())]; |
92 | 92 | return false; |
93 | 93 | } |
94 | - } elseif (! $edmxVersion = CsdlConstants::EdmToEdmxVersions($model->GetEdmVersion() ?? Version::v3())) { |
|
95 | - $errors = [new EdmError(new CsdlLocation(0, 0), EdmErrorCode::UnknownEdmVersion(), StringConst::Serializer_UnknownEdmVersion()) ]; |
|
94 | + } elseif (!$edmxVersion = CsdlConstants::EdmToEdmxVersions($model->GetEdmVersion() ?? Version::v3())) { |
|
95 | + $errors = [new EdmError(new CsdlLocation(0, 0), EdmErrorCode::UnknownEdmVersion(), StringConst::Serializer_UnknownEdmVersion())]; |
|
96 | 96 | return false; |
97 | 97 | } |
98 | 98 |
@@ -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 | } |
@@ -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 | } |
@@ -47,7 +47,7 @@ |
||
47 | 47 | ) { |
48 | 48 | $qualifiedName = $element->FullName(); |
49 | 49 | switch ($element->getSchemaElementKind()) { |
50 | - case SchemaElementKind::Function(): |
|
50 | + case SchemaElementKind::Function (): |
|
51 | 51 | assert($element instanceof IFunction); |
52 | 52 | self::AddFunction($element, $qualifiedName, $functionGroupDictionary); |
53 | 53 | break; |
@@ -47,7 +47,7 @@ |
||
47 | 47 | ) { |
48 | 48 | $qualifiedName = $element->FullName(); |
49 | 49 | switch ($element->getSchemaElementKind()) { |
50 | - case SchemaElementKind::Function(): |
|
50 | + case SchemaElementKind::function(): |
|
51 | 51 | assert($element instanceof IFunction); |
52 | 52 | self::AddFunction($element, $qualifiedName, $functionGroupDictionary); |
53 | 53 | break; |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | |
144 | 144 | $thisTypeKeys = array_keys($thisFunction->getParameters()); |
145 | 145 | $otherTypeKeys = array_keys($otherFunction->getParameters()); |
146 | - $keyCount = count($thisTypeKeys); |
|
146 | + $keyCount = count($thisTypeKeys); |
|
147 | 147 | for ($i = 0; $i < $keyCount; ++$i) { |
148 | 148 | if ( |
149 | 149 | !self::isEquivalentTo( |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | |
212 | 212 | $thisTypeKeys = array_keys($thisType->getDeclaredProperties()); |
213 | 213 | $otherTypeKeys = array_keys($otherType->getDeclaredProperties()); |
214 | - $keyCount = count($thisTypeKeys); |
|
214 | + $keyCount = count($thisTypeKeys); |
|
215 | 215 | for ($i = 0; $i < $keyCount; ++$i) { |
216 | 216 | if ( |
217 | 217 | !self::isEquivalentTo( |