@@ -83,8 +83,7 @@ |
||
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 |
@@ -97,8 +97,7 @@ |
||
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 | } |
@@ -105,8 +105,7 @@ discard block |
||
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 |
||
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 | } |
@@ -107,8 +107,7 @@ |
||
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. |
@@ -236,8 +236,7 @@ |
||
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'); |
@@ -211,8 +211,7 @@ |
||
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 | } |
@@ -43,8 +43,7 @@ |
||
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 | } |
@@ -47,8 +47,7 @@ |
||
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()); |
@@ -207,16 +207,13 @@ |
||
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 | } |