Passed
Push — 8.x-3.x ( e317fe...6bac25 )
by
unknown
11:10
created
graphql_core/src/Plugin/Deriver/Fields/EntityReferenceQueryDeriver.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,8 +94,7 @@
 block discarded – undo
94 94
 
95 95
         if ($fieldDefinition instanceof BaseFieldDefinition || !$entityType->hasKey('bundle')) {
96 96
           $parents = [StringHelper::camelCase($entityTypeId)];
97
-        }
98
-        else {
97
+        } else {
99 98
           $parents = [];
100 99
           foreach ($fieldMap[$entityTypeId][$fieldName]['bundles'] as $bundle) {
101 100
             $parents[] = StringHelper::camelCase($entityTypeId . '_' . $bundle);
Please login to merge, or discard this patch.
modules/graphql_core/src/Plugin/Deriver/Fields/EntityFieldDeriver.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,8 +43,7 @@
 block discarded – undo
43 43
       $propertyDefinition = reset($propertyDefinitions);
44 44
       $derivative['type'] = $propertyDefinition->getDataType();
45 45
       $derivative['property'] = key($propertyDefinitions);
46
-    }
47
-    else {
46
+    } else {
48 47
       $derivative['type'] = StringHelper::camelCase('field', $entityTypeId, $supportsBundles ? $fieldBundle : '', $fieldName);
49 48
     }
50 49
 
Please login to merge, or discard this patch.
graphql_core/src/Plugin/GraphQL/Mutations/Entity/DeleteEntityBase.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,8 +94,7 @@
 block discarded – undo
94 94
 
95 95
       try {
96 96
         $entity->delete();
97
-      }
98
-      catch (EntityStorageException $exception) {
97
+      } catch (EntityStorageException $exception) {
99 98
         return new EntityCrudOutputWrapper(NULL, NULL, [
100 99
           $this->t('Entity deletion failed with exception: @exception.', [
101 100
             '@exception' => $exception->getMessage(),
Please login to merge, or discard this patch.
graphql_core/src/Plugin/GraphQL/Mutations/Entity/UpdateEntityBase.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -107,8 +107,7 @@
 block discarded – undo
107 107
         foreach ($input as $key => $value) {
108 108
           $entity->get($key)->setValue($value);
109 109
         }
110
-      }
111
-      catch (\InvalidArgumentException $exception) {
110
+      } catch (\InvalidArgumentException $exception) {
112 111
         return new EntityCrudOutputWrapper(NULL, NULL, [
113 112
           $this->t('The entity update failed with exception: @exception.', ['@exception' => $exception->getMessage()]),
114 113
         ]);
Please login to merge, or discard this patch.
modules/graphql_core/src/Plugin/GraphQL/Fields/Blocks/BlocksByRegion.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -147,8 +147,7 @@
 block discarded – undo
147 147
           $plugin = $block->getPlugin();
148 148
           if ($plugin instanceof BlockContentBlock) {
149 149
             return $this->entityRepository->loadEntityByUuid('block_content', $plugin->getDerivativeId());
150
-          }
151
-          else {
150
+          } else {
152 151
             return $block;
153 152
           }
154 153
         }, $response->getValue());
Please login to merge, or discard this patch.
modules/graphql_core/src/Plugin/GraphQL/Fields/Routing/RouteEntity.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -138,8 +138,7 @@
 block discarded – undo
138 138
     $access = $entity->access('view', NULL, TRUE);
139 139
     if ($access->isAllowed()) {
140 140
       yield $entity->addCacheableDependency($access);
141
-    }
142
-    else {
141
+    } else {
143 142
       yield new CacheableValue(NULL, [$access]);
144 143
     }
145 144
   }
Please login to merge, or discard this patch.
graphql_core/src/Plugin/GraphQL/Fields/Routing/Response/ResponseHeader.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,7 @@
 block discarded – undo
30 30
   protected function resolveValues($value, array $args, ResolveContext $context, ResolveInfo $info) {
31 31
     if ($value instanceof Response) {
32 32
       yield $value->headers->get($args['key']);
33
-    }
34
-    else if ($value instanceof ResponseInterface) {
33
+    } else if ($value instanceof ResponseInterface) {
35 34
       yield implode(";", $value->getHeader($args['key']));
36 35
     }
37 36
   }
Please login to merge, or discard this patch.
graphql_core/src/Plugin/GraphQL/Fields/Routing/Response/ResponseCode.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@
 block discarded – undo
27 27
   protected function resolveValues($value, array $args, ResolveContext $context, ResolveInfo $info) {
28 28
     if ($value instanceof Response) {
29 29
       yield $value->getStatusCode();
30
-    }
31
-    else if ($value instanceof ResponseInterface) {
30
+    } else if ($value instanceof ResponseInterface) {
32 31
       yield $value->getStatusCode();
33 32
     }
34 33
   }
Please login to merge, or discard this patch.
graphql_core/src/Plugin/GraphQL/Fields/Routing/Response/ResponseContent.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@
 block discarded – undo
27 27
   protected function resolveValues($value, array $args, ResolveContext $context, ResolveInfo $info) {
28 28
     if ($value instanceof Response) {
29 29
       yield $value->getContent();
30
-    }
31
-    else if ($value instanceof ResponseInterface) {
30
+    } else if ($value instanceof ResponseInterface) {
32 31
       yield (string) $value->getBody();
33 32
     }
34 33
   }
Please login to merge, or discard this patch.