@@ -28,11 +28,9 @@ discard block |
||
28 | 28 | |
29 | 29 | $foundProperties = new HashSetInternal(); |
30 | 30 | |
31 | - foreach ($type->Properties() as $typeProperty) |
|
32 | - { |
|
31 | + foreach ($type->Properties() as $typeProperty) { |
|
33 | 32 | $annotationProperty = $annotation->FindPropertyBinding($typeProperty); |
34 | - if ($annotationProperty == null) |
|
35 | - { |
|
33 | + if ($annotationProperty == null) { |
|
36 | 34 | $context->AddRawError( |
37 | 35 | new EdmError( |
38 | 36 | $annotation->Location(), |
@@ -42,19 +40,14 @@ discard block |
||
42 | 40 | ) |
43 | 41 | ) |
44 | 42 | ); |
45 | - } |
|
46 | - else |
|
47 | - { |
|
43 | + } else { |
|
48 | 44 | $foundProperties->add($typeProperty); |
49 | 45 | } |
50 | 46 | } |
51 | 47 | |
52 | - if (!$type->isOpen()) |
|
53 | - { |
|
54 | - foreach ($annotation->getPropertyValueBindings() as $property) |
|
55 | - { |
|
56 | - if (!$foundProperties.contains($property->getBoundProperty()) && !$context->checkIsBad($property)) |
|
57 | - { |
|
48 | + if (!$type->isOpen()) { |
|
49 | + foreach ($annotation->getPropertyValueBindings() as $property) { |
|
50 | + if (!$foundProperties.contains($property->getBoundProperty()) && !$context->checkIsBad($property)) { |
|
58 | 51 | $context->AddError( |
59 | 52 | $property->Location(), |
60 | 53 | EdmErrorCode::TypeAnnotationHasExtraProperties(), |
@@ -26,8 +26,7 @@ |
||
26 | 26 | $term = $annotation->getTerm(); |
27 | 27 | if ( |
28 | 28 | !($term instanceof IUnresolvedElement) && |
29 | - $context->getModel()->FindType($term->FullName()) instanceof IStructuredType) |
|
30 | - { |
|
29 | + $context->getModel()->FindType($term->FullName()) instanceof IStructuredType) { |
|
31 | 30 | $context->AddError( |
32 | 31 | $annotation->Location(), |
33 | 32 | EdmErrorCode::BadUnresolvedTerm(), |
@@ -22,8 +22,7 @@ |
||
22 | 22 | { |
23 | 23 | assert($typeReference instanceof ITypeReference); |
24 | 24 | $schemaType = $typeReference->getDefinition(); |
25 | - if ($schemaType !== null && $schemaType instanceof ISchemaType && !$context->checkIsBad($schemaType)) |
|
26 | - { |
|
25 | + if ($schemaType !== null && $schemaType instanceof ISchemaType && !$context->checkIsBad($schemaType)) { |
|
27 | 26 | Helpers::CheckForUnreachableTypeError($context, $schemaType, $typeReference->Location()); |
28 | 27 | } |
29 | 28 | } |
@@ -21,8 +21,7 @@ |
||
21 | 21 | public function __invoke(ValidationContext $context, ?IEdmElement $type) |
22 | 22 | { |
23 | 23 | assert($type instanceof IBinaryTypeReference); |
24 | - if ($type->getMaxLength() < 0) |
|
25 | - { |
|
24 | + if ($type->getMaxLength() < 0) { |
|
26 | 25 | $context->AddError( |
27 | 26 | $type->Location(), |
28 | 27 | EdmErrorCode::MaxLengthOutOfRange(), |
@@ -21,8 +21,7 @@ |
||
21 | 21 | public function __invoke(ValidationContext $context, ?IEdmElement $type) |
22 | 22 | { |
23 | 23 | assert($type instanceof IBinaryTypeReference); |
24 | - if ($type->getMaxLength() != null && $type->isUnBounded()) |
|
25 | - { |
|
24 | + if ($type->getMaxLength() != null && $type->isUnBounded()) { |
|
26 | 25 | $context->AddError( |
27 | 26 | $type->Location(), |
28 | 27 | EdmErrorCode::IsUnboundedCannotBeTrueWhileMaxLengthIsNotNull(), |
@@ -23,10 +23,8 @@ |
||
23 | 23 | { |
24 | 24 | assert($edmFunction instanceof IFunctionBase); |
25 | 25 | $parameterList = new HashSetInternal(); |
26 | - if ($edmFunction->getParameters() != null) |
|
27 | - { |
|
28 | - foreach ($edmFunction->getParameters() as $parameter) |
|
29 | - { |
|
26 | + if ($edmFunction->getParameters() != null) { |
|
27 | + foreach ($edmFunction->getParameters() as $parameter) { |
|
30 | 28 | ValidationHelper::AddMemberNameToHashSet( |
31 | 29 | $parameter, |
32 | 30 | $parameterList, |
@@ -20,8 +20,7 @@ |
||
20 | 20 | public function __invoke(ValidationContext $context, ?IEdmElement $type) |
21 | 21 | { |
22 | 22 | assert($type instanceof IStringTypeReference); |
23 | - if ($type->getMaxLength() != null && $type->isUnbounded()) |
|
24 | - { |
|
23 | + if ($type->getMaxLength() != null && $type->isUnbounded()) { |
|
25 | 24 | $context->AddError( |
26 | 25 | $type->Location(), |
27 | 26 | EdmErrorCode::IsUnboundedCannotBeTrueWhileMaxLengthIsNotNull(), |
@@ -21,8 +21,7 @@ |
||
21 | 21 | public function __invoke(ValidationContext $context, ?IEdmElement $type) |
22 | 22 | { |
23 | 23 | assert($type instanceof IStringTypeReference); |
24 | - if ($type->getMaxLength() < 0) |
|
25 | - { |
|
24 | + if ($type->getMaxLength() < 0) { |
|
26 | 25 | $context->AddError( |
27 | 26 | $type->Location(), |
28 | 27 | EdmErrorCode::MaxLengthOutOfRange(), |
@@ -21,8 +21,7 @@ |
||
21 | 21 | public function __invoke(ValidationContext $context, ?IEdmElement $type) |
22 | 22 | { |
23 | 23 | assert($type instanceof IType); |
24 | - if ($type->getTypeKind()->isNone() && !$context->checkIsBad($type)) |
|
25 | - { |
|
24 | + if ($type->getTypeKind()->isNone() && !$context->checkIsBad($type)) { |
|
26 | 25 | $context->AddError( |
27 | 26 | $type->Location(), |
28 | 27 | EdmErrorCode::TypeMustNotHaveKindOfNone(), |