@@ -94,8 +94,7 @@ |
||
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); |
@@ -43,8 +43,7 @@ |
||
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 |
@@ -94,8 +94,7 @@ |
||
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(), |
@@ -107,8 +107,7 @@ |
||
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 | ]); |
@@ -147,8 +147,7 @@ |
||
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()); |
@@ -138,8 +138,7 @@ |
||
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 | } |
@@ -30,8 +30,7 @@ |
||
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 | } |
@@ -27,8 +27,7 @@ |
||
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 | } |
@@ -27,8 +27,7 @@ |
||
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 | } |