@@ -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 | } |
@@ -132,8 +132,7 @@ discard block |
||
132 | 132 | $alias = null; |
133 | 133 | if ($this->namespaceAliasMappings != null) { |
134 | 134 | $alias = array_key_exists($element->getNamespace(), $this->namespaceAliasMappings) ? |
135 | - $this->namespaceAliasMappings[$element->getNamespace()] : |
|
136 | - null; |
|
135 | + $this->namespaceAliasMappings[$element->getNamespace()] : null; |
|
137 | 136 | } |
138 | 137 | |
139 | 138 | $this->schemaWriter->WriteSchemaElementHeader($element, $alias, $mappings); |
@@ -608,7 +607,7 @@ discard block |
||
608 | 607 | protected function ProcessPropertyReferenceExpression(IPropertyReferenceExpression $expression): void |
609 | 608 | { |
610 | 609 | $this->BeginElement($expression, [$this->schemaWriter, 'WritePropertyReferenceExpressionElementHeader']); |
611 | - if ($expression->getBase()!= null) { |
|
610 | + if ($expression->getBase() != null) { |
|
612 | 611 | $this->VisitExpression($expression->getBase()); |
613 | 612 | } |
614 | 613 | |
@@ -1206,10 +1205,10 @@ discard block |
||
1206 | 1205 | return false; |
1207 | 1206 | } |
1208 | 1207 | |
1209 | - $thisAssociationAnnotations =[]; |
|
1208 | + $thisAssociationAnnotations = []; |
|
1210 | 1209 | $thisEnd1Annotations = []; |
1211 | - $thisEnd2Annotations =[]; |
|
1212 | - $thisConstraintAnnotations =[]; |
|
1210 | + $thisEnd2Annotations = []; |
|
1211 | + $thisConstraintAnnotations = []; |
|
1213 | 1212 | $this->model->GetAssociationAnnotations( |
1214 | 1213 | $thisPrimary, |
1215 | 1214 | $thisAssociationAnnotations, |
@@ -1221,7 +1220,7 @@ discard block |
||
1221 | 1220 | $thatAssociationAnnotations = []; |
1222 | 1221 | $thatEnd1Annotations = []; |
1223 | 1222 | $thatEnd2Annotations = []; |
1224 | - $thatConstraintAnnotations =[]; |
|
1223 | + $thatConstraintAnnotations = []; |
|
1225 | 1224 | $this->model->GetAssociationAnnotations( |
1226 | 1225 | $thatPrimary, |
1227 | 1226 | $thatAssociationAnnotations, |
@@ -1335,8 +1334,8 @@ discard block |
||
1335 | 1334 | ); |
1336 | 1335 | |
1337 | 1336 | $thatAssociationSetAnnotations = []; |
1338 | - $thatEnd1Annotations =[]; |
|
1339 | - $thatEnd2Annotations =[]; |
|
1337 | + $thatEnd1Annotations = []; |
|
1338 | + $thatEnd2Annotations = []; |
|
1340 | 1339 | $this->model->GetAssociationSetAnnotations( |
1341 | 1340 | $thatEntitySet, |
1342 | 1341 | $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 |
@@ -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 | } |
@@ -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; |
@@ -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 |
@@ -155,7 +155,7 @@ |
||
155 | 155 | ); |
156 | 156 | break; |
157 | 157 | |
158 | - case ValueKind::Null(): |
|
158 | + case ValueKind::null(): |
|
159 | 159 | InterfaceValidator::CollectErrors( |
160 | 160 | InterfaceValidator::CheckForInterfaceKindValueMismatchError( |
161 | 161 | $value, |
@@ -17,7 +17,7 @@ |
||
17 | 17 | $references[] = $expression->getReferencedEnumMember(); |
18 | 18 | return null; |
19 | 19 | } else { |
20 | - return [ InterfaceValidator::CreatePropertyMustNotBeNullError($expression, 'ReferencedEnumMember') ]; |
|
20 | + return [InterfaceValidator::CreatePropertyMustNotBeNullError($expression, 'ReferencedEnumMember')]; |
|
21 | 21 | } |
22 | 22 | } |
23 | 23 |
@@ -18,7 +18,7 @@ |
||
18 | 18 | $followup[] = $type->getElementType(); |
19 | 19 | return null; |
20 | 20 | } else { |
21 | - return[ InterfaceValidator::CreatePropertyMustNotBeNullError($type, 'ElementType')]; |
|
21 | + return[InterfaceValidator::CreatePropertyMustNotBeNullError($type, 'ElementType')]; |
|
22 | 22 | } |
23 | 23 | } |
24 | 24 |