@@ -53,7 +53,7 @@ |
||
53 | 53 | { |
54 | 54 | foreach ($annotation->getPropertyValueBindings() as $property) |
55 | 55 | { |
56 | - if (!$foundProperties.contains($property->getBoundProperty()) && !$context->checkIsBad($property)) |
|
56 | + if (!$foundProperties . contains($property->getBoundProperty()) && !$context->checkIsBad($property)) |
|
57 | 57 | { |
58 | 58 | $context->AddError( |
59 | 59 | $property->Location(), |
@@ -36,8 +36,8 @@ |
||
36 | 36 | { |
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 | - if(!XmlConvert::VerifyNCName($annotation->getName())){ |
|
40 | - $value = $annotation->getValue() ; |
|
39 | + if (!XmlConvert::VerifyNCName($annotation->getName())) { |
|
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 | } |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | $stringValue = $annotation->getValue(); |
26 | 26 | if ($stringValue != null && $stringValue instanceof IStringValue) |
27 | 27 | { |
28 | - if ( boolval( |
|
28 | + if (boolval( |
|
29 | 29 | $context |
30 | 30 | ->getModel() |
31 | 31 | ->getDirectValueAnnotationsManager() |
@@ -37,8 +37,7 @@ discard block |
||
37 | 37 | )) |
38 | 38 | { |
39 | 39 | $error = null; |
40 | - if (! |
|
41 | - ValidationHelper::ValidateValueCanBeWrittenAsXmlElementAnnotation( |
|
40 | + if (!ValidationHelper::ValidateValueCanBeWrittenAsXmlElementAnnotation( |
|
42 | 41 | $stringValue, |
43 | 42 | $annotation->getNamespaceUri(), |
44 | 43 | $annotation->getName(), |
@@ -47,7 +47,7 @@ |
||
47 | 47 | foreach ($parameters as $parameter) |
48 | 48 | { |
49 | 49 | $recursiveErrors = null; |
50 | - if (!ExpressionTypeChecker::tryAssertType(current($arguments),$parameter->getType(), $recursiveErrors)) |
|
50 | + if (!ExpressionTypeChecker::tryAssertType(current($arguments), $parameter->getType(), $recursiveErrors)) |
|
51 | 51 | { |
52 | 52 | foreach ($recursiveErrors as $error) |
53 | 53 | { |
@@ -32,7 +32,7 @@ |
||
32 | 32 | return; |
33 | 33 | } |
34 | 34 | |
35 | - if (! EdmUtil::IsNullOrWhiteSpaceInternal($item->getName()) && strlen($item->getName()) <= CsdlConstants::Max_NameLength && strlen($item->getName()) > 0) |
|
35 | + if (!EdmUtil::IsNullOrWhiteSpaceInternal($item->getName()) && strlen($item->getName()) <= CsdlConstants::Max_NameLength && strlen($item->getName()) > 0) |
|
36 | 36 | { |
37 | 37 | if (!EdmUtil::IsValidUndottedName($item->getName())) |
38 | 38 | { |
@@ -24,7 +24,7 @@ |
||
24 | 24 | assert($entityType instanceof IEntityType); |
25 | 25 | if ($entityType->getDeclaredKey() != null) |
26 | 26 | { |
27 | - foreach ($entityType->getDeclaredKey() as $key ) |
|
27 | + foreach ($entityType->getDeclaredKey() as $key) |
|
28 | 28 | { |
29 | 29 | assert($key instanceof IStructuralProperty); |
30 | 30 | // Key must be one of the declared properties. |
@@ -20,7 +20,7 @@ |
||
20 | 20 | |
21 | 21 | public function __invoke(ValidationContext $context, ?IEdmElement $entityType) |
22 | 22 | { |
23 | - assert( $entityType instanceof IEntityType); |
|
23 | + assert($entityType instanceof IEntityType); |
|
24 | 24 | if (($entityType->Key() == null || count($entityType->Key()) == 0) && $entityType->getBaseType() === null) |
25 | 25 | { |
26 | 26 | $context->AddError( |
@@ -23,7 +23,7 @@ |
||
23 | 23 | assert($entityType instanceof IEntityType); |
24 | 24 | if ($entityType->Key() != null) |
25 | 25 | { |
26 | - foreach ( $entityType->Key() as $key) |
|
26 | + foreach ($entityType->Key() as $key) |
|
27 | 27 | { |
28 | 28 | assert($key instanceof IStructuralProperty); |
29 | 29 | if ($key->getType()->IsBinary() && !$context->checkIsBad($key->getType()->getDefinition())) |
@@ -35,7 +35,7 @@ |
||
35 | 35 | if (!$item->getSchemaElementKind()->isEntityContainer()) |
36 | 36 | { |
37 | 37 | $function = $item; |
38 | - if ( $function instanceof IFunction) |
|
38 | + if ($function instanceof IFunction) |
|
39 | 39 | { |
40 | 40 | // If a non-function already exists with the same name, stop processing as a function, as it is irrelevant it will always be an error. |
41 | 41 | if ($nonFunctionNameList->contains($fullName)) |