@@ -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 | } |
@@ -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")) { |
@@ -181,11 +181,11 @@ |
||
| 181 | 181 | // Check if this field is an Address field. |
| 182 | 182 | if (isset($address['address_line1'])) { |
| 183 | 183 | // Format the address as a single string. |
| 184 | - $string .= $address['address_line1'] . "\n"; |
|
| 185 | - $string .= !empty($address['address_line2']) ? $address['address_line2'] . "\n" : ''; |
|
| 186 | - $string .= $address['locality'] . ', '; |
|
| 187 | - $string .= str_replace('US-', '', $address['administrative_area']) . ' '; |
|
| 188 | - $string .= $address['postal_code'] . "\n"; |
|
| 184 | + $string .= $address['address_line1']."\n"; |
|
| 185 | + $string .= !empty($address['address_line2']) ? $address['address_line2']."\n" : ''; |
|
| 186 | + $string .= $address['locality'].', '; |
|
| 187 | + $string .= str_replace('US-', '', $address['administrative_area']).' '; |
|
| 188 | + $string .= $address['postal_code']."\n"; |
|
| 189 | 189 | $string .= $address['country_code']; |
| 190 | 190 | } |
| 191 | 191 | |
@@ -126,8 +126,7 @@ |
||
| 126 | 126 | $coordinates = $this->getSetting('show_coordinates'); |
| 127 | 127 | if ($coordinates) { |
| 128 | 128 | $summary[] = $this->t('Coordinates are shown'); |
| 129 | - } |
|
| 130 | - else { |
|
| 129 | + } else { |
|
| 131 | 130 | $summary[] = $this->t('Coordinates are hidden'); |
| 132 | 131 | } |
| 133 | 132 | |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | if ($node = $event->getRequest()->get('node')) { |
| 61 | 61 | if (\Drupal::currentUser()->hasPermission('view latest version')) { |
| 62 | 62 | $theme = $this->themeManager->getActiveTheme()->getName(); |
| 63 | - $tag = 'config:block.block.' . $theme . '_local_actions'; |
|
| 63 | + $tag = 'config:block.block.'.$theme.'_local_actions'; |
|
| 64 | 64 | $this->cacheTagsInvalidator->invalidateTags([$tag]); |
| 65 | 65 | } |
| 66 | 66 | } |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | * {@inheritdoc} |
| 19 | 19 | */ |
| 20 | 20 | public static function getSubscribedEvents() { |
| 21 | - $events[RoutingEvents::ALTER] = ['onAlterRoutes',-9999]; // negative Values means "late" |
|
| 21 | + $events[RoutingEvents::ALTER] = ['onAlterRoutes', -9999]; // negative Values means "late" |
|
| 22 | 22 | return $events; |
| 23 | 23 | } |
| 24 | 24 | |
@@ -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; |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | if (!empty($settings)) { |
| 211 | 211 | // Use the Type Style color as the button's background color. |
| 212 | 212 | if (!empty($settings['color'])) { |
| 213 | - $build['actions']['quick_draft_form'][$id]['#attributes']['style'] = 'background-color: ' . $settings['color']; |
|
| 213 | + $build['actions']['quick_draft_form'][$id]['#attributes']['style'] = 'background-color: '.$settings['color']; |
|
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | // Add the Type Style icon to the button. |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | 'button' => [ |
| 222 | 222 | '#type' => 'container', |
| 223 | 223 | '#attributes' => ['class' => ['moderation-sidebar-form-button'], 'style' => ['position: relative']], |
| 224 | - 'child-icon' => ['#markup' => '<i class="material-icons">' . $settings['icon'] . '</i>'], |
|
| 224 | + 'child-icon' => ['#markup' => '<i class="material-icons">'.$settings['icon'].'</i>'], |
|
| 225 | 225 | 'child-action' => $build['actions']['quick_draft_form'][$id], |
| 226 | 226 | ], |
| 227 | 227 | ]; |
@@ -22,12 +22,12 @@ |
||
| 22 | 22 | public function build() { |
| 23 | 23 | $build = [ |
| 24 | 24 | '#markup' => |
| 25 | - '<div class="df-tools-magellan-block hide-for-small-only full-width-row sticky-container">' . |
|
| 26 | - ' <div data-sticky-light>' . |
|
| 27 | - ' <nav data-magellan-light>' . |
|
| 28 | - ' <ul class="horizontal menu nav expanded"></ul>' . |
|
| 29 | - ' </nav>' . |
|
| 30 | - ' </div>' . |
|
| 25 | + '<div class="df-tools-magellan-block hide-for-small-only full-width-row sticky-container">'. |
|
| 26 | + ' <div data-sticky-light>'. |
|
| 27 | + ' <nav data-magellan-light>'. |
|
| 28 | + ' <ul class="horizontal menu nav expanded"></ul>'. |
|
| 29 | + ' </nav>'. |
|
| 30 | + ' </div>'. |
|
| 31 | 31 | '</div>', |
| 32 | 32 | ]; |
| 33 | 33 | |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | batch_set($batch); |
| 91 | 91 | // Set a batch to update configuration as well. |
| 92 | 92 | if ($batch = locale_config_batch_update_components($options, $langcodes)) { |
| 93 | - $batch['file'] = drupal_get_path('module', 'df_tools_translation') . '/df_tools_translation.batch.inc'; |
|
| 93 | + $batch['file'] = drupal_get_path('module', 'df_tools_translation').'/df_tools_translation.batch.inc'; |
|
| 94 | 94 | batch_set($batch); |
| 95 | 95 | } |
| 96 | 96 | } |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | |
| 117 | 117 | // Import each file. |
| 118 | 118 | foreach ($langcodes as $langcode) { |
| 119 | - $filepath = DRUPAL_ROOT . '/' . $path . '/translations/' . $langcode . '.po'; |
|
| 119 | + $filepath = DRUPAL_ROOT.'/'.$path.'/translations/'.$langcode.'.po'; |
|
| 120 | 120 | if (file_exists($filepath)) { |
| 121 | 121 | \Drupal::moduleHandler()->loadInclude('locale', 'bulk.inc'); |
| 122 | 122 | \Drupal::moduleHandler()->loadInclude('locale', 'translation.inc'); |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | ]); |
| 131 | 131 | |
| 132 | 132 | $original_file = (object) [ |
| 133 | - 'filename' => $langcode . '.po', |
|
| 133 | + 'filename' => $langcode.'.po', |
|
| 134 | 134 | 'uri' => $filepath |
| 135 | 135 | ]; |
| 136 | 136 | $file = locale_translate_file_attach_properties($original_file, $options); |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | if ($langcode == 'en') { |
| 174 | 174 | $langcode = ''; |
| 175 | 175 | } |
| 176 | - $url = \Drupal\Core\Url::fromUri('base:/' . $langcode . $alias); |
|
| 176 | + $url = \Drupal\Core\Url::fromUri('base:/'.$langcode.$alias); |
|
| 177 | 177 | |
| 178 | 178 | $current_name = [ |
| 179 | 179 | '#markup' => t($language->getName()) |