@@ -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 | } |
@@ -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( |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | if (!in_array($property->getPartner(), $property->getPartner()->getDeclaringType()->getDeclaredProperties())) { |
| 25 | 25 | $followup[] = $property->getPartner(); |
| 26 | 26 | } else { |
| 27 | - $references[] =$property->getPartner(); |
|
| 27 | + $references[] = $property->getPartner(); |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | if ($property->getPartner()->getPartner() !== $property || $property->getPartner() === $property) { |
@@ -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, |