| @@ -37,7 +37,7 @@ | ||
| 37 | 37 | */ | 
| 38 | 38 | public function __construct(string $namespaceName, string $name, $type) | 
| 39 | 39 |      { | 
| 40 | - $type = ($type instanceof PrimitiveTypeKind) ? EdmCoreModel::getInstance()->getPrimitive($type, true): $type; | |
| 40 | + $type = ($type instanceof PrimitiveTypeKind) ? EdmCoreModel::getInstance()->getPrimitive($type, true) : $type; | |
| 41 | 41 | assert($type instanceof ITypeReference); | 
| 42 | 42 | parent::__construct($name); | 
| 43 | 43 | $this->type = $type; | 
| @@ -24,8 +24,7 @@ | ||
| 24 | 24 | assert($property instanceof IStructuralProperty); | 
| 25 | 25 |          if ($property->getDeclaringType()->getTypeKind()->isRow()) { | 
| 26 | 26 | $validatedType = $property->getType()->isCollection() ? | 
| 27 | - $property->getType()->asCollection()->elementType()->getDefinition() : | |
| 28 | - $property->getType()->getDefinition(); | |
| 27 | + $property->getType()->asCollection()->elementType()->getDefinition() : $property->getType()->getDefinition(); | |
| 29 | 28 | |
| 30 | 29 | EdmUtil::checkArgumentNull($validatedType, 'validatedType'); | 
| 31 | 30 | if (!$validatedType->getTypeKind()->isPrimitive() && | 
| @@ -43,8 +43,7 @@ | ||
| 43 | 43 | StringConst::EdmModel_Validator_Semantic_InvalidPropertyTypeConcurrencyMode( | 
| 44 | 44 | ( | 
| 45 | 45 | $propType->isCollection() ? | 
| 46 | - EdmConstants::Type_Collection : | |
| 47 | - $key | |
| 46 | + EdmConstants::Type_Collection : $key | |
| 48 | 47 | ) | 
| 49 | 48 | ) | 
| 50 | 49 | ); | 
| @@ -32,8 +32,7 @@ | ||
| 32 | 32 |          if (null !== $functionImport->getEntitySet() && null !== $returnType) { | 
| 33 | 33 | /** @var ITypeReference $elementType */ | 
| 34 | 34 | $elementType = $returnType->isCollection() ? | 
| 35 | - $returnType->asCollection()->elementType() : | |
| 36 | - $returnType; | |
| 35 | + $returnType->asCollection()->elementType() : $returnType; | |
| 37 | 36 | EdmUtil::checkArgumentNull($elementType->getDefinition(), 'elementType->getDefinition'); | 
| 38 | 37 |              if ($elementType->isEntity()) { | 
| 39 | 38 | $returnedEntityType = $elementType->asEntity()->entityDefinition(); | 
| @@ -24,8 +24,7 @@ | ||
| 24 | 24 | assert($functionImport instanceof IFunctionImport); | 
| 25 | 25 |          if (null !== $functionImport->getReturnType()) { | 
| 26 | 26 | $elementType = $functionImport->getReturnType()->isCollection() ? | 
| 27 | - $functionImport->getReturnType()->asCollection()->elementType() : | |
| 28 | - $functionImport->getReturnType(); | |
| 27 | + $functionImport->getReturnType()->asCollection()->elementType() : $functionImport->getReturnType(); | |
| 29 | 28 | if (!$elementType->isPrimitive() && | 
| 30 | 29 | !$elementType->isEntity() && | 
| 31 | 30 | !$elementType->isComplex() && | 
| @@ -28,10 +28,10 @@ | ||
| 28 | 28 | if (!$context->checkIsBad($enumMember->getDeclaringType()) && | 
| 29 | 29 | !$context->checkIsBad($enumMember->getDeclaringType()->getUnderlyingType()) && | 
| 30 | 30 | !ExpressionTypeChecker::tryAssertPrimitiveAsType( | 
| 31 | - $enumMember->getValue(), | |
| 32 | - EdmTypeSemantics::getPrimitiveTypeReference($enumMember->getDeclaringType()->getUnderlyingType(), false), | |
| 33 | - $discoveredErrors | |
| 34 | -                       )) { | |
| 31 | + $enumMember->getValue(), | |
| 32 | + EdmTypeSemantics::getPrimitiveTypeReference($enumMember->getDeclaringType()->getUnderlyingType(), false), | |
| 33 | + $discoveredErrors | |
| 34 | +                        )) { | |
| 35 | 35 | EdmUtil::checkArgumentNull($enumMember->location(), 'enumMember->Location'); | 
| 36 | 36 | $context->addError( | 
| 37 | 37 | $enumMember->location(), | 
| @@ -36,8 +36,7 @@ | ||
| 36 | 36 | ) ?? false | 
| 37 | 37 |              )) { | 
| 38 | 38 | $error = null; | 
| 39 | - if (! | |
| 40 | - ValidationHelper::validateValueCanBeWrittenAsXmlElementAnnotation( | |
| 39 | + if (!ValidationHelper::validateValueCanBeWrittenAsXmlElementAnnotation( | |
| 41 | 40 | $stringValue, | 
| 42 | 41 | $annotation->getNamespaceUri(), | 
| 43 | 42 | $annotation->getName(), | 
| @@ -36,7 +36,7 @@ | ||
| 36 | 36 | // Note: this check can be done without the try/catch block, but we need XmlConvert.IsStartNCNameChar and | 
| 37 | 37 | // XmlConvert.IsNCNameChar, which are not available in 3.5. | 
| 38 | 38 |              if (!XmlConvert::verifyNCName($annotation->getName())) { | 
| 39 | - $value = $annotation->getValue() ; | |
| 39 | + $value = $annotation->getValue(); | |
| 40 | 40 | $errorLocation = ($value === null || !($value instanceof IValue)) ? null : $value->location(); | 
| 41 | 41 | $error = new EdmError( | 
| 42 | 42 | $errorLocation, | 
| @@ -28,8 +28,7 @@ | ||
| 28 | 28 | public static function validate(IModel $root, $versionOrRuleset, array &$errors): bool | 
| 29 | 29 |      { | 
| 30 | 30 | $ruleSet = $versionOrRuleset instanceof Version ? | 
| 31 | - ValidationRuleSet::getEdmModelRuleSet($versionOrRuleset) : | |
| 32 | - $versionOrRuleset; | |
| 31 | + ValidationRuleSet::getEdmModelRuleSet($versionOrRuleset) : $versionOrRuleset; | |
| 33 | 32 | assert($ruleSet instanceof ValidationRuleSet); | 
| 34 | 33 | $errors = InterfaceValidator::validateModelStructureAndSemantics($root, $ruleSet); | 
| 35 | 34 | return count($errors) === 0; |