@@ -23,8 +23,7 @@ |
||
23 | 23 | assert($functionImport instanceof IFunctionImport); |
24 | 24 | if ($functionImport->getReturnType() != null) { |
25 | 25 | $elementType = $functionImport->getReturnType()->IsCollection() ? |
26 | - $functionImport->getReturnType()->AsCollection()->ElementType() : |
|
27 | - $functionImport->getReturnType(); |
|
26 | + $functionImport->getReturnType()->AsCollection()->ElementType() : $functionImport->getReturnType(); |
|
28 | 27 | if ( |
29 | 28 | !$elementType->IsPrimitive() && |
30 | 29 | !$elementType->IsEntity() && |
@@ -34,11 +34,11 @@ discard block |
||
34 | 34 | $target = $annotation->getTarget(); |
35 | 35 | $foundTarget = false; |
36 | 36 | |
37 | - $entityContainer = $target ; |
|
37 | + $entityContainer = $target; |
|
38 | 38 | if ($entityContainer instanceof IEntityContainer) { |
39 | 39 | $foundTarget = ($context->getModel()->findEntityContainer($entityContainer->FullName()) != null); |
40 | 40 | } else { |
41 | - $entitySet = $target ; |
|
41 | + $entitySet = $target; |
|
42 | 42 | if ($entitySet instanceof IEntitySet) { |
43 | 43 | $container = $entitySet->getContainer(); |
44 | 44 | if ($container != null && $context instanceof IEntityContainer) { |
@@ -49,9 +49,9 @@ discard block |
||
49 | 49 | if ($schemaType != null && $schemaType instanceof ISchemaType) { |
50 | 50 | $foundTarget = ($context->getModel()->FindType($schemaType->FullName()) != null); |
51 | 51 | } else { |
52 | - $term = $target ; |
|
52 | + $term = $target; |
|
53 | 53 | if ($term != null && $term instanceof ITerm) { |
54 | - $foundTarget = ($context->getModel()->FindValueTerm($term->FullName())!= null); |
|
54 | + $foundTarget = ($context->getModel()->FindValueTerm($term->FullName()) != null); |
|
55 | 55 | } else { |
56 | 56 | $function = $target; |
57 | 57 | if ($function != null && $function instanceof IFunction) { |
@@ -31,8 +31,7 @@ |
||
31 | 31 | StringConst::EdmModel_Validator_Semantic_InvalidPropertyTypeConcurrencyMode( |
32 | 32 | ( |
33 | 33 | $property->getType()->IsCollection() ? |
34 | - EdmConstants::Type_Collection : |
|
35 | - $property->getType()->TypeKind()->getKey() |
|
34 | + EdmConstants::Type_Collection : $property->getType()->TypeKind()->getKey() |
|
36 | 35 | ) |
37 | 36 | ) |
38 | 37 | ); |
@@ -12,6 +12,6 @@ |
||
12 | 12 | { |
13 | 13 | public function getValidatedType(): string |
14 | 14 | { |
15 | - return IPrimitiveValue::class ; |
|
15 | + return IPrimitiveValue::class; |
|
16 | 16 | } |
17 | 17 | } |
@@ -37,7 +37,7 @@ |
||
37 | 37 | |
38 | 38 | // Note: this check can be done without the try/catch block, but we need XmlConvert.IsStartNCNameChar and XmlConvert.IsNCNameChar, which are not available in 3.5. |
39 | 39 | if (!XmlConvert::VerifyNCName($annotation->getName())) { |
40 | - $value = $annotation->getValue() ; |
|
40 | + $value = $annotation->getValue(); |
|
41 | 41 | $errorLocation = ($value === null || !($value instanceof IValue)) ? null : $value->Location(); |
42 | 42 | $context->AddRawError(new EdmError($errorLocation, EdmErrorCode::InvalidName(), StringConst::EdmModel_Validator_Syntactic_EdmModel_NameIsNotAllowed($annotation->getName()))); |
43 | 43 | } |
@@ -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(), |
@@ -31,7 +31,7 @@ |
||
31 | 31 | return; |
32 | 32 | } |
33 | 33 | |
34 | - if (! EdmUtil::IsNullOrWhiteSpaceInternal($item->getName()) && strlen($item->getName()) <= CsdlConstants::Max_NameLength && strlen($item->getName()) > 0) { |
|
34 | + if (!EdmUtil::IsNullOrWhiteSpaceInternal($item->getName()) && strlen($item->getName()) <= CsdlConstants::Max_NameLength && strlen($item->getName()) > 0) { |
|
35 | 35 | if (!EdmUtil::IsValidUndottedName($item->getName())) { |
36 | 36 | $context->AddError( |
37 | 37 | $item->Location(), |
@@ -27,8 +27,7 @@ |
||
27 | 27 | public static function Validate(IModel $root, $versionOrRuleset, array &$errors): bool |
28 | 28 | { |
29 | 29 | $ruleSet = $versionOrRuleset instanceof Version ? |
30 | - ValidationRuleSet::getEdmModelRuleSet($versionOrRuleset) : |
|
31 | - $versionOrRuleset; |
|
30 | + ValidationRuleSet::getEdmModelRuleSet($versionOrRuleset) : $versionOrRuleset; |
|
32 | 31 | assert($ruleSet instanceof ValidationRuleSet); |
33 | 32 | $errors = InterfaceValidator::ValidateModelStructureAndSemantics($root, $ruleSet); |
34 | 33 | return count($errors) === 0; |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | public function offsetExists($offset) |
41 | 41 | { |
42 | - return is_int($offset) && 0 <= $offset && $offset < $this->length; |
|
42 | + return is_int($offset) && 0 <= $offset && $offset < $this->length; |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | */ |
60 | 60 | public function offsetSet($offset, $value) |
61 | 61 | { |
62 | - if (!is_int($value) || $value <0 || $value > 255) { |
|
62 | + if (!is_int($value) || $value < 0 || $value > 255) { |
|
63 | 63 | throw new \InvalidArgumentException(sprintf('%s is an invalid value for a ByteArray', $value)); |
64 | 64 | } |
65 | 65 | if ($this->readonly) { |