@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | /** @var Drupal\migrate_source_csv\CSVFileObject $iterator */ |
23 | 23 | $iterator = $source->initializeIterator(); |
24 | 24 | $base_path = $iterator->getPath(); |
25 | - $filename = $base_path . '/' . $iterator->getFilename(); |
|
25 | + $filename = $base_path.'/'.$iterator->getFilename(); |
|
26 | 26 | |
27 | 27 | $destination = $migration->getDestinationPlugin(); |
28 | 28 | $entity_type = explode(':', $destination->getPluginId())[1]; |
@@ -73,14 +73,14 @@ discard block |
||
73 | 73 | $entity = $entity_storage->load($id); |
74 | 74 | |
75 | 75 | // See if a Panelizer config file exists for this Node. |
76 | - $panels_file = $base_path . '/panelizer.panels_display.' . $entity_type . '.' . $entity->uuid() . '.yml'; |
|
76 | + $panels_file = $base_path.'/panelizer.panels_display.'.$entity_type.'.'.$entity->uuid().'.yml'; |
|
77 | 77 | if (file_exists($panels_file) && isset($entity->panelizer)) { |
78 | 78 | $yaml = file_get_contents($panels_file); |
79 | 79 | |
80 | 80 | $panels_display = Yaml::parse($yaml); |
81 | 81 | |
82 | 82 | // The storage ID isn't based on UUIDs, unfortunately. Hotswap it with current info. |
83 | - $panels_display['storage_id'] = $entity_type . ':' . $entity->id() . ':full:' . $entity->getRevisionId(); |
|
83 | + $panels_display['storage_id'] = $entity_type.':'.$entity->id().':full:'.$entity->getRevisionId(); |
|
84 | 84 | |
85 | 85 | // Set the Panels Display to match what's defined in YAML. |
86 | 86 | $entity->panelizer->panels_display = $panels_display; |
@@ -68,8 +68,7 @@ discard block |
||
68 | 68 | if (isset($options['langcode'])) { |
69 | 69 | $url_options['language'] = \Drupal::languageManager()->getLanguage($options['langcode']); |
70 | 70 | $langcode = $options['langcode']; |
71 | - } |
|
72 | - else { |
|
71 | + } else { |
|
73 | 72 | $langcode = NULL; |
74 | 73 | } |
75 | 74 | |
@@ -93,8 +92,7 @@ discard block |
||
93 | 92 | $replacements[$original] = Url::fromRoute('entity.node.latest_version', [ |
94 | 93 | 'node' => $node->id(), |
95 | 94 | ], $url_options)->toString(); |
96 | - } |
|
97 | - else { |
|
95 | + } else { |
|
98 | 96 | $replacements[$original] = $latest->toUrl('canonical', $url_options)->toString(); |
99 | 97 | } |
100 | 98 | break; |
@@ -132,12 +132,12 @@ |
||
132 | 132 | if ($transition = ModerationStateTransition::load($id)) { |
133 | 133 | $styles = type_style_get_styles($transition); |
134 | 134 | if (!empty($styles)) { |
135 | - $build['actions']['quick_draft_form'][$id]['#attributes']['style'] = 'background-color: ' . $styles['color']; |
|
135 | + $build['actions']['quick_draft_form'][$id]['#attributes']['style'] = 'background-color: '.$styles['color']; |
|
136 | 136 | $build['actions']['quick_draft_form'][$id] = [ |
137 | 137 | '#type' => 'container', |
138 | 138 | $build['actions']['quick_draft_form'][$id], |
139 | 139 | [ |
140 | - '#markup' => '<i class="material-icons">' . $styles['icon'] . '</i>' |
|
140 | + '#markup' => '<i class="material-icons">'.$styles['icon'].'</i>' |
|
141 | 141 | ], |
142 | 142 | '#attributes' => [ |
143 | 143 | 'class' => ['moderation-sidebar-button-wrapper'], |
@@ -43,12 +43,12 @@ discard block |
||
43 | 43 | } |
44 | 44 | else { |
45 | 45 | foreach ($value as $j) { |
46 | - $output[] = $this->keysToString($keys) . '[] = ' . $j; |
|
46 | + $output[] = $this->keysToString($keys).'[] = '.$j; |
|
47 | 47 | } |
48 | 48 | } |
49 | 49 | } |
50 | 50 | else { |
51 | - $output[] = $this->keysToString($keys) . ' = ' . $value; |
|
51 | + $output[] = $this->keysToString($keys).' = '.$value; |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | array_pop($keys); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | protected function keysToString(array $keys) { |
70 | 70 | $head = array_shift($keys); |
71 | 71 | if ($keys) { |
72 | - return $head . '[' . implode('][', $keys) . ']'; |
|
72 | + return $head.'['.implode('][', $keys).']'; |
|
73 | 73 | } |
74 | 74 | else { |
75 | 75 | return $head; |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | foreach (['key', 'value1', 'value2', 'value3'] as $var) { |
124 | 124 | $$var = isset($match[++$i]) ? $match[$i] : ''; |
125 | 125 | } |
126 | - $value = stripslashes(substr($value1, 1, -1)) . stripslashes(substr($value2, 1, -1)) . $value3; |
|
126 | + $value = stripslashes(substr($value1, 1, -1)).stripslashes(substr($value2, 1, -1)).$value3; |
|
127 | 127 | |
128 | 128 | // Parse array syntax. |
129 | 129 | $keys = preg_split('/\]?\[/', rtrim($key, ']')); |
@@ -40,14 +40,12 @@ discard block |
||
40 | 40 | if (is_array($value)) { |
41 | 41 | if ($this->isAssociative($value)) { |
42 | 42 | $output = array_merge($output, $this->doEncode($value, $keys)); |
43 | - } |
|
44 | - else { |
|
43 | + } else { |
|
45 | 44 | foreach ($value as $j) { |
46 | 45 | $output[] = $this->keysToString($keys) . '[] = ' . $j; |
47 | 46 | } |
48 | 47 | } |
49 | - } |
|
50 | - else { |
|
48 | + } else { |
|
51 | 49 | $output[] = $this->keysToString($keys) . ' = ' . $value; |
52 | 50 | } |
53 | 51 | |
@@ -70,8 +68,7 @@ discard block |
||
70 | 68 | $head = array_shift($keys); |
71 | 69 | if ($keys) { |
72 | 70 | return $head . '[' . implode('][', $keys) . ']'; |
73 | - } |
|
74 | - else { |
|
71 | + } else { |
|
75 | 72 | return $head; |
76 | 73 | } |
77 | 74 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | /** @var \Composer\Package\Link $package */ |
29 | 29 | foreach ($patched_dependencies as $package) { |
30 | 30 | if (static::packageIsUnpinned($package)) { |
31 | - $error[] = $package->getTarget() . ': ' . $package->getPrettyConstraint(); |
|
31 | + $error[] = $package->getTarget().': '.$package->getPrettyConstraint(); |
|
32 | 32 | } |
33 | 33 | } |
34 | 34 | if (!empty($error)) { |
@@ -35,8 +35,7 @@ |
||
35 | 35 | array_unshift($error, 'The following dependencies are patched but don\'t have pinned dependency constraints:'); |
36 | 36 | $event->getIO()->writeError($error); |
37 | 37 | return FALSE; |
38 | - } |
|
39 | - else { |
|
38 | + } else { |
|
40 | 39 | $event->getIO()->write('Patched dependencies have constraints that are properly pinned.'); |
41 | 40 | } |
42 | 41 | } |
@@ -284,7 +284,7 @@ |
||
284 | 284 | } |
285 | 285 | else if ($referenced_entity instanceof MediaInterface) { |
286 | 286 | if ($depth < self::DEPTH_LIMIT && $file = $this->getFileFromEntity($referenced_entity)) { |
287 | - $return = $file; |
|
287 | + $return = $file; |
|
288 | 288 | } |
289 | 289 | } |
290 | 290 | } |
@@ -132,8 +132,7 @@ discard block |
||
132 | 132 | if ($this->getSetting('image_link')) { |
133 | 133 | $summary[] = $this->t('Thumbnail is linked to entity'); |
134 | 134 | } |
135 | - } |
|
136 | - else { |
|
135 | + } else { |
|
137 | 136 | $summary[] = $this->t('Please select a responsive image style.'); |
138 | 137 | } |
139 | 138 | |
@@ -227,8 +226,7 @@ discard block |
||
227 | 226 | if ($file = $this->getFileFromEntity($block_content)) { |
228 | 227 | return $file; |
229 | 228 | } |
230 | - } |
|
231 | - else if ($block instanceof EntityField) { |
|
229 | + } else if ($block instanceof EntityField) { |
|
232 | 230 | list (, $field_name) = explode(':', $block->getDerivativeId()); |
233 | 231 | if ($entity->hasField($field_name) && $field = $entity->get($field_name)) { |
234 | 232 | if ($file = $this->getFileFromField($field)) { |
@@ -281,8 +279,7 @@ discard block |
||
281 | 279 | $referenced_entity = reset($referenced_entities); |
282 | 280 | if ($referenced_entity instanceof FileInterface) { |
283 | 281 | $return = $referenced_entity; |
284 | - } |
|
285 | - else if ($referenced_entity instanceof MediaInterface) { |
|
282 | + } else if ($referenced_entity instanceof MediaInterface) { |
|
286 | 283 | if ($depth < self::DEPTH_LIMIT && $file = $this->getFileFromEntity($referenced_entity)) { |
287 | 284 | $return = $file; |
288 | 285 | } |
@@ -139,7 +139,7 @@ |
||
139 | 139 | $selection['table'][$mid] = [ |
140 | 140 | '#attributes' => [ |
141 | 141 | 'class' => ['draggable'], |
142 | - 'data-entity-id' => $media->getEntityTypeId() . ':' . $mid, |
|
142 | + 'data-entity-id' => $media->getEntityTypeId().':'.$mid, |
|
143 | 143 | ], |
144 | 144 | 'title' => ['#markup' => $media->label()], |
145 | 145 | 'type' => ['#markup' => $bundle_info[$media->bundle()]['label']], |
@@ -206,8 +206,7 @@ discard block |
||
206 | 206 | if ($media && $media->access('view')) { |
207 | 207 | if (isset(static::$recursiveRenderDepth[$mid])) { |
208 | 208 | static::$recursiveRenderDepth[$mid]++; |
209 | - } |
|
210 | - else { |
|
209 | + } else { |
|
211 | 210 | static::$recursiveRenderDepth[$mid] = 1; |
212 | 211 | } |
213 | 212 | |
@@ -236,8 +235,7 @@ discard block |
||
236 | 235 | $mids = \Drupal::entityQuery('media') |
237 | 236 | ->condition('uuid', $this->configuration['uuids'], 'IN') |
238 | 237 | ->execute(); |
239 | - } |
|
240 | - else { |
|
238 | + } else { |
|
241 | 239 | $mids = []; |
242 | 240 | } |
243 | 241 |
@@ -53,8 +53,7 @@ |
||
53 | 53 | foreach ($arguments as $argument) { |
54 | 54 | if ($argument{0} == '-') { |
55 | 55 | $task->rawArg($argument); |
56 | - } |
|
57 | - else { |
|
56 | + } else { |
|
58 | 57 | $feature = "tests/features/$argument"; |
59 | 58 | |
60 | 59 | if (file_exists("$feature.feature")) { |
@@ -113,8 +113,7 @@ discard block |
||
113 | 113 | } |
114 | 114 | |
115 | 115 | $info['projects'][$name] = $this->buildProject($package); |
116 | - } |
|
117 | - elseif ($this->isLightning($package)) { |
|
116 | + } elseif ($this->isLightning($package)) { |
|
118 | 117 | $info['projects'][$name] = $this->buildProject($package); |
119 | 118 | |
120 | 119 | // The Lightning project uses semantic versioning. |
@@ -228,12 +227,10 @@ discard block |
||
228 | 227 | $info['download']['branch'] = $package['version']; |
229 | 228 | } |
230 | 229 | $info['download']['revision'] = $package['source']['reference']; |
231 | - } |
|
232 | - else { |
|
230 | + } else { |
|
233 | 231 | if ($package['type'] == 'drupal-core') { |
234 | 232 | $version = $package['version']; |
235 | - } |
|
236 | - else { |
|
233 | + } else { |
|
237 | 234 | // Make tag versioning Drupal-friendly. 8.1.0-alpha1 => 8.x-1.0-alpha1. |
238 | 235 | $version = sprintf( |
239 | 236 | '%d.x-%s', |
@@ -57,7 +57,7 @@ |
||
57 | 57 | |
58 | 58 | /** @var \Acquia\LightningExtension\Context\UtilityContext $utility */ |
59 | 59 | $utility = $this->getContext(UtilityContext::class); |
60 | - $utility->acceptAlerts(function () { |
|
60 | + $utility->acceptAlerts(function() { |
|
61 | 61 | $this->awaitAjax(); |
62 | 62 | }); |
63 | 63 | } |