@@ -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. |
@@ -22,14 +22,11 @@ |
||
22 | 22 | public function __invoke(ValidationContext $context, ?IEdmElement $entityType) |
23 | 23 | { |
24 | 24 | assert($entityType instanceof IEntityType); |
25 | - if ($entityType->getDeclaredKey() != null) |
|
26 | - { |
|
27 | - foreach ($entityType->getDeclaredKey() as $key ) |
|
28 | - { |
|
25 | + if ($entityType->getDeclaredKey() != null) { |
|
26 | + foreach ($entityType->getDeclaredKey() as $key ) { |
|
29 | 27 | assert($key instanceof IStructuralProperty); |
30 | 28 | // Key must be one of the declared properties. |
31 | - if ($key->getDeclaringType() !== $entityType && !$context->checkIsBad($key)) |
|
32 | - { |
|
29 | + if ($key->getDeclaringType() !== $entityType && !$context->checkIsBad($key)) { |
|
33 | 30 | $context->AddError( |
34 | 31 | $entityType->Location(), |
35 | 32 | EdmErrorCode::KeyPropertyMustBelongToEntity(), |
@@ -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( |
@@ -21,8 +21,7 @@ |
||
21 | 21 | public function __invoke(ValidationContext $context, ?IEdmElement $entityType) |
22 | 22 | { |
23 | 23 | assert( $entityType instanceof IEntityType); |
24 | - if (($entityType->Key() == null || count($entityType->Key()) == 0) && $entityType->getBaseType() === null) |
|
25 | - { |
|
24 | + if (($entityType->Key() == null || count($entityType->Key()) == 0) && $entityType->getBaseType() === null) { |
|
26 | 25 | $context->AddError( |
27 | 26 | $entityType->Location(), |
28 | 27 | EdmErrorCode::KeyMissingOnEntityType(), |
@@ -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())) |
@@ -21,13 +21,10 @@ |
||
21 | 21 | public function __invoke(ValidationContext $context, ?IEdmElement $entityType) |
22 | 22 | { |
23 | 23 | assert($entityType instanceof IEntityType); |
24 | - if ($entityType->Key() != null) |
|
25 | - { |
|
26 | - foreach ( $entityType->Key() as $key) |
|
27 | - { |
|
24 | + if ($entityType->Key() != null) { |
|
25 | + foreach ( $entityType->Key() as $key) { |
|
28 | 26 | assert($key instanceof IStructuralProperty); |
29 | - if ($key->getType()->IsBinary() && !$context->checkIsBad($key->getType()->getDefinition())) |
|
30 | - { |
|
27 | + if ($key->getType()->IsBinary() && !$context->checkIsBad($key->getType()->getDefinition())) { |
|
31 | 28 | $context->AddError( |
32 | 29 | $key->Location(), |
33 | 30 | EdmErrorCode::EntityKeyMustNotBeBinary(), |
@@ -24,11 +24,9 @@ |
||
24 | 24 | public function __invoke(ValidationContext $context, ?IEdmElement $entityType) |
25 | 25 | { |
26 | 26 | assert($entityType instanceof IEntityType); |
27 | - if ($entityType->getDeclaredKey() != null) |
|
28 | - { |
|
27 | + if ($entityType->getDeclaredKey() != null) { |
|
29 | 28 | $keyPropertyNameList = new HashSetInternal(); |
30 | - foreach ($entityType->getDeclaredKey() as $item) |
|
31 | - { |
|
29 | + foreach ($entityType->getDeclaredKey() as $item) { |
|
32 | 30 | ValidationHelper::AddMemberNameToHashSet( |
33 | 31 | $item, |
34 | 32 | $keyPropertyNameList, |
@@ -22,8 +22,7 @@ |
||
22 | 22 | public function __invoke(ValidationContext $context, ?IEdmElement $type) |
23 | 23 | { |
24 | 24 | assert($type instanceof ITemporalTypeReference); |
25 | - if ($type->getPrecision() > EdmConstants::Max_Precision || $type->getPrecision() < EdmConstants::Min_Precision) |
|
26 | - { |
|
25 | + if ($type->getPrecision() > EdmConstants::Max_Precision || $type->getPrecision() < EdmConstants::Min_Precision) { |
|
27 | 26 | $context->AddError( |
28 | 27 | $type->Location(), |
29 | 28 | EdmErrorCode::PrecisionOutOfRange(), |
@@ -28,10 +28,8 @@ |
||
28 | 28 | strlen($item->getNamespace()) <= CsdlConstants::Max_NamespaceLength && |
29 | 29 | strlen($item->getNamespace()) > 0 && |
30 | 30 | !EdmUtil::IsNullOrWhiteSpaceInternal($item->getNamespace()) |
31 | - ) |
|
32 | - { |
|
33 | - if (!EdmUtil::IsValidDottedName($item->getNamespace())) |
|
34 | - { |
|
31 | + ) { |
|
32 | + if (!EdmUtil::IsValidDottedName($item->getNamespace())) { |
|
35 | 33 | $context->AddError( |
36 | 34 | $item->Location(), |
37 | 35 | EdmErrorCode::InvalidNamespaceName(), |
@@ -21,8 +21,7 @@ |
||
21 | 21 | public function __invoke(ValidationContext $context, ?IEdmElement $element) |
22 | 22 | { |
23 | 23 | assert($element instanceof ISchemaElement); |
24 | - if ($element->getSchemaElementKind()->isNone() && !$context->checkIsBad($element)) |
|
25 | - { |
|
24 | + if ($element->getSchemaElementKind()->isNone() && !$context->checkIsBad($element)) { |
|
26 | 25 | $context->AddError( |
27 | 26 | $element->Location(), |
28 | 27 | EdmErrorCode::SchemaElementMustNotHaveKindOfNone(), |
@@ -22,8 +22,7 @@ |
||
22 | 22 | public function __invoke(ValidationContext $context, ?IEdmElement $item) |
23 | 23 | { |
24 | 24 | assert($item instanceof ISchemaElement); |
25 | - if (EdmUtil::IsNullOrWhiteSpaceInternal($item->getNamespace()) || strlen($item->getNamespace()) === 0) |
|
26 | - { |
|
25 | + if (EdmUtil::IsNullOrWhiteSpaceInternal($item->getNamespace()) || strlen($item->getNamespace()) === 0) { |
|
27 | 26 | $context->AddError( |
28 | 27 | $item->Location(), |
29 | 28 | EdmErrorCode::InvalidNamespaceName(), |
@@ -22,8 +22,7 @@ |
||
22 | 22 | public function __invoke(ValidationContext $context, ?IEdmElement $element) |
23 | 23 | { |
24 | 24 | assert($element instanceof ISchemaElement); |
25 | - if (ValidationHelper::IsEdmSystemNamespace($element->getNamespace())) |
|
26 | - { |
|
25 | + if (ValidationHelper::IsEdmSystemNamespace($element->getNamespace())) { |
|
27 | 26 | $context->AddError( |
28 | 27 | $element->Location(), |
29 | 28 | EdmErrorCode::SystemNamespaceEncountered(), |