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.
modules/graphql_core/src/Plugin/Deriver/Enums/DisplayModeIdDeriver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
    */
63 63
   protected function getDisplayModes() {
64 64
     $storage = $this->entityTypeManager->getStorage('entity_view_mode');
65
-    return array_reduce($storage->loadMultiple(), function ($carry, EntityViewModeInterface $current) {
65
+    return array_reduce($storage->loadMultiple(), function($carry, EntityViewModeInterface $current) {
66 66
       $target = $current->getTargetType();
67 67
       list(, $id) = explode('.', $current->id());
68 68
 
Please login to merge, or discard this patch.
graphql_core/src/Plugin/GraphQL/Mutations/Entity/CreateEntityBase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
     // EarlyRenderingControllerWrapperSubscriber throws the leaked cache
77 77
     // metadata exception. To avoid this, wrap the execution in its own render
78 78
     // context.
79
-    return $this->renderer->executeInRenderContext(new RenderContext(), function () use ($value, $args, $context, $info) {
79
+    return $this->renderer->executeInRenderContext(new RenderContext(), function() use ($value, $args, $context, $info) {
80 80
       $entityTypeId = $this->pluginDefinition['entity_type'];
81 81
 
82 82
       // The raw input needs to be converted to use the proper field and property
Please login to merge, or discard this patch.
graphql_core/src/Plugin/GraphQL/Mutations/Entity/DeleteEntityBase.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
     // EarlyRenderingControllerWrapperSubscriber throws the leaked cache
76 76
     // metadata exception. To avoid this, wrap the execution in its own render
77 77
     // context.
78
-    return $this->renderer->executeInRenderContext(new RenderContext(), function () use ($value, $args, $context, $info) {
78
+    return $this->renderer->executeInRenderContext(new RenderContext(), function() use ($value, $args, $context, $info) {
79 79
       $entityTypeId = $this->pluginDefinition['entity_type'];
80 80
       $storage = $this->entityTypeManager->getStorage($entityTypeId);
81 81
 
Please login to merge, or discard this 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 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
     // EarlyRenderingControllerWrapperSubscriber throws the leaked cache
75 75
     // metadata exception. To avoid this, wrap the execution in its own render
76 76
     // context.
77
-    return $this->renderer->executeInRenderContext(new RenderContext(), function () use ($value, $args, $context, $info) {
77
+    return $this->renderer->executeInRenderContext(new RenderContext(), function() use ($value, $args, $context, $info) {
78 78
       $entityTypeId = $this->pluginDefinition['entity_type'];
79 79
       $bundleName = $this->pluginDefinition['entity_bundle'];
80 80
       $storage = $this->entityTypeManager->getStorage($entityTypeId);
Please login to merge, or discard this 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.
src/Plugin/GraphQL/Fields/Mutations/ConstraintViolationMessage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
    * {@inheritdoc}
25 25
    */
26 26
   public function resolveValues($value, array $args, ResolveContext $context, ResolveInfo $info) {
27
-    if ($value instanceof ConstraintViolationInterface){
27
+    if ($value instanceof ConstraintViolationInterface) {
28 28
       yield $value->getMessage();
29 29
     }
30 30
   }
Please login to merge, or discard this patch.
src/Plugin/GraphQL/Fields/EntityReference/EntityReferenceQuery.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
     // Add the target field condition to the query.
65 65
     $definition = $this->getPluginDefinition();
66 66
     $field = $definition['field'];
67
-    $ids = array_map(function ($item) {
67
+    $ids = array_map(function($item) {
68 68
       return $item['target_id'];
69 69
     }, $value->get($field)->getValue());
70 70
 
Please login to merge, or discard this patch.
modules/graphql_core/src/Plugin/GraphQL/Fields/Menu/MenuLinks.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
         ['callable' => 'menu.default_tree_manipulators:generateIndexAndSort'],
73 73
       ];
74 74
 
75
-      foreach (array_filter($this->menuLinkTree->transform($tree, $manipulators), function (MenuLinkTreeElement $item) {
75
+      foreach (array_filter($this->menuLinkTree->transform($tree, $manipulators), function(MenuLinkTreeElement $item) {
76 76
         return $item->link instanceof MenuLinkInterface && $item->link->isEnabled() && (empty($item->access) || $item->access->isAllowed());
77 77
       }) as $branch) {
78 78
         yield $branch;
Please login to merge, or discard this patch.