Passed
Push — 8.x-3.x ( e317fe...6bac25 )
by
unknown
11:10
created
src/Plugin/GraphQL/Fields/Entity/Fields/Image/ImageDerivative.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,8 +83,7 @@
 block discarded – undo
83 83
       if ($style->supportsUri($file->getFileUri())) {
84 84
         $style->transformDimensions($dimensions, $file->getFileUri());
85 85
         $url = $style->buildUrl($file->getFileUri());
86
-      }
87
-      else {
86
+      } else {
88 87
         $url = $file->getFileUri();
89 88
       }
90 89
 
Please login to merge, or discard this patch.
modules/graphql_core/src/Plugin/GraphQL/Fields/Entity/EntityRendered.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,8 +97,7 @@
 block discarded – undo
97 97
 
98 98
       if (!$context->isEmpty()) {
99 99
         yield new CacheableValue((string) $result, [$context->pop()]);
100
-      }
101
-      else {
100
+      } else {
102 101
         yield (string) $result;
103 102
       }
104 103
     }
Please login to merge, or discard this patch.
modules/graphql_core/src/Plugin/GraphQL/Fields/Entity/EntityById.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -105,8 +105,7 @@  discard block
 block discarded – undo
105 105
         $pluginDefinition = $this->getPluginDefinition();
106 106
         $entityType = $this->entityTypeManager->getDefinition($pluginDefinition['entity_type']);
107 107
         yield (new CacheableValue(NULL))->addCacheTags($entityType->getListCacheTags());
108
-      }
109
-      else {
108
+      } else {
110 109
         /** @var \Drupal\Core\Entity\EntityInterface $entity */
111 110
         $access = $entity->access('view', NULL, TRUE);
112 111
 
@@ -118,8 +117,7 @@  discard block
 block discarded – undo
118 117
           }
119 118
 
120 119
           yield $entity->addCacheableDependency($access);
121
-        }
122
-        else {
120
+        } else {
123 121
           yield new CacheableValue(NULL, [$access]);
124 122
         }
125 123
       }
Please login to merge, or discard this patch.
graphql_core/src/Plugin/GraphQL/Fields/Entity/EntityRevisionById.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
       }
108 108
 
109 109
       yield new CacheableValue($entity, [$access]);
110
-    }
111
-    else {
110
+    } else {
112 111
       // If the entity exists but we do not grant access to it, we still want
113 112
       // to have it's cache metadata in the output because future changes to
114 113
       // the entity might affect its visibility for the user.
Please login to merge, or discard this patch.
modules/graphql_core/src/Plugin/GraphQL/Fields/EntityQuery/EntityQuery.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -236,8 +236,7 @@
 block discarded – undo
236 236
       // Mark the query as such and sort by the revision id too.
237 237
       $query->allRevisions();
238 238
       $query->addTag('revisions');
239
-    }
240
-    else if ($mode === 'latest') {
239
+    } else if ($mode === 'latest') {
241 240
       // Mark the query to only include latest revision and sort by revision id.
242 241
       $query->latestRevision();
243 242
       $query->addTag('revisions');
Please login to merge, or discard this patch.
graphql_core/src/Plugin/GraphQL/Fields/EntityQuery/EntityQueryEntities.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -211,8 +211,7 @@
 block discarded – undo
211 211
       $access = $entity->access('view', NULL, TRUE);
212 212
       if ($access->isAllowed()) {
213 213
         yield $entity->addCacheableDependency($access);
214
-      }
215
-      else {
214
+      } else {
216 215
         yield new CacheableValue(NULL, [$access]);
217 216
       }
218 217
     }
Please login to merge, or discard this patch.
modules/graphql_core/tests/src/Kernel/Blocks/BlockTest.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
     $this->installEntitySchema('block_content');
44 44
     try {
45 45
       $this->installEntitySchema('path_alias');
46
-    }
47
-    catch (PluginNotFoundException $exc) {
46
+    } catch (PluginNotFoundException $exc) {
48 47
       // Ignore if the path_alias entity doesn't exist. This means we are
49 48
       // testing a Drupal version < 8.8 and aliases are not entities yet.
50 49
     }
Please login to merge, or discard this patch.
src/Form/EntityQueryMapImportForm.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,8 +47,7 @@
 block discarded – undo
47 47
     /** @var \Drupal\file\FileInterface $file */
48 48
     if (empty($files) || !($file = reset($files)) || !($file instanceof FileInterface)) {
49 49
       $formState->setError($form['query_map_json'], $this->t('No file was uploaded.'));
50
-    }
51
-    else {
50
+    } else {
52 51
       // Save the file for use in the submit handler.
53 52
       $formState->set('file', $file);
54 53
       $map = file_get_contents($file->getFileUri());
Please login to merge, or discard this patch.
src/GraphQL/Execution/QueryProcessor.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -207,16 +207,13 @@
 block discarded – undo
207 207
       }
208 208
 
209 209
       return $this->executeUncachableOperation($adapter, $config, $params, $document, !$persisted);
210
-    }
211
-    catch (CacheableRequestError $exception) {
210
+    } catch (CacheableRequestError $exception) {
212 211
       return $adapter->createFulfilled(
213 212
         new QueryResult(NULL, [Error::createLocatedError($exception)], [], $exception)
214 213
           );
215
-    }
216
-    catch (RequestError $exception) {
214
+    } catch (RequestError $exception) {
217 215
       return $adapter->createFulfilled(new QueryResult(NULL, [Error::createLocatedError($exception)]));
218
-    }
219
-    catch (Error $exception) {
216
+    } catch (Error $exception) {
220 217
       return $adapter->createFulfilled(new QueryResult(NULL, [$exception]));
221 218
     }
222 219
   }
Please login to merge, or discard this patch.