Passed
Pull Request — master (#40)
by Alex
03:15
created
Validation/ValidationRules/IEntityType/EntityTypeKeyMissingOnEntityType.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,7 @@
 block discarded – undo
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(),
Please login to merge, or discard this patch.
ValidationRules/IEntityType/EntityTypeEntityKeyMustNotBeBinaryBeforeV2.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,13 +21,10 @@
 block discarded – undo
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(),
Please login to merge, or discard this patch.
IEntityType/EntityTypeDuplicatePropertyNameSpecifiedInEntityKey.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,11 +24,9 @@
 block discarded – undo
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,
Please login to merge, or discard this patch.
ITemporalTypeReference/TemporalTypeReferencePrecisionOutOfRange.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@
 block discarded – undo
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(),
Please login to merge, or discard this patch.
ValidationRules/ISchemaElement/SchemaElementNamespaceIsNotAllowed.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,10 +28,8 @@
 block discarded – undo
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(),
Please login to merge, or discard this patch.
ValidationRules/ISchemaElement/SchemaElementMustNotHaveKindOfNone.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,7 @@
 block discarded – undo
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(),
Please login to merge, or discard this patch.
ISchemaElement/SchemaElementNamespaceMustNotBeEmptyOrWhiteSpace.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@
 block discarded – undo
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(),
Please login to merge, or discard this patch.
ValidationRules/ISchemaElement/SchemaElementSystemNamespaceEncountered.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@
 block discarded – undo
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(),
Please login to merge, or discard this patch.
ValidationRules/ISchemaElement/SchemaElementNamespaceIsTooLong.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@
 block discarded – undo
22 22
     public function __invoke(ValidationContext $context, ?IEdmElement $item)
23 23
     {
24 24
         assert($item instanceof ISchemaElement);
25
-        if (strlen($item->getNamespace()) > CsdlConstants::Max_NamespaceLength)
26
-        {
25
+        if (strlen($item->getNamespace()) > CsdlConstants::Max_NamespaceLength) {
27 26
             $context->AddError(
28 27
                 $item->Location(),
29 28
                 EdmErrorCode::InvalidNamespaceName(),
Please login to merge, or discard this patch.