@@ -12,7 +12,7 @@ |
||
12 | 12 | foreach ($settings['editor']['formats'] as &$format) { |
13 | 13 | // Swap in our custom JS by adding a pseudo plugin. We do this as we do not |
14 | 14 | // provide a button, which is what traditional CKEditor plugins would do. |
15 | - $format['editorSettings']['drupalExternalPlugins']['df_tools_editor'] = base_path() . drupal_get_path('module', 'df_tools_editor') . '/js/df_tools_editor.js'; |
|
15 | + $format['editorSettings']['drupalExternalPlugins']['df_tools_editor'] = base_path().drupal_get_path('module', 'df_tools_editor').'/js/df_tools_editor.js'; |
|
16 | 16 | $format['editorSettings']['extraPlugins'] .= ',df_tools_editor'; |
17 | 17 | } |
18 | 18 | } |
@@ -92,8 +92,7 @@ |
||
92 | 92 | |
93 | 93 | if (!empty($css_classes)) { |
94 | 94 | $form_state->setValue(['attributes', 'class'], $css_classes); |
95 | - } |
|
96 | - else { |
|
95 | + } else { |
|
97 | 96 | $form_state->unsetValue(['attributes', 'class']); |
98 | 97 | } |
99 | 98 | } |
@@ -1,4 +1,4 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once drupal_get_path('module', 'locale') . '/locale.bulk.inc'; |
|
4 | -include_once drupal_get_path('module', 'locale') . '/locale.batch.inc'; |
|
3 | +include_once drupal_get_path('module', 'locale').'/locale.bulk.inc'; |
|
4 | +include_once drupal_get_path('module', 'locale').'/locale.batch.inc'; |
@@ -10,13 +10,13 @@ |
||
10 | 10 | foreach ($geofield_map as $entity_type_id => $fields) { |
11 | 11 | foreach ($fields as $field_name => $info) { |
12 | 12 | $args = array('@field_name' => $field_name); |
13 | - $data_key = $entity_type_id . '__' . $field_name; |
|
13 | + $data_key = $entity_type_id.'__'.$field_name; |
|
14 | 14 | |
15 | 15 | $field_coordinates_table_data = $data[$data_key][$field_name]; |
16 | - $data[$data_key][$data_key . '_simple_proximity'] = [ |
|
16 | + $data[$data_key][$data_key.'_simple_proximity'] = [ |
|
17 | 17 | 'group' => 'Content', |
18 | 18 | 'title' => t('Simple Proximity (@field_name)', $args), |
19 | - 'title short' => $field_coordinates_table_data['title short'] . t(' Simple Proximity'), |
|
19 | + 'title short' => $field_coordinates_table_data['title short'].t(' Simple Proximity'), |
|
20 | 20 | 'help' => $field_coordinates_table_data['help'], |
21 | 21 | 'real field' => $field_name, |
22 | 22 | 'filter' => [ |
@@ -6,6 +6,6 @@ |
||
6 | 6 | function df_tools_frontend_library_info_alter(&$libraries, $extension) { |
7 | 7 | if ($extension == 'image') { |
8 | 8 | $path = drupal_get_path('module', 'df_tools_frontend'); |
9 | - $libraries['quickedit.inPlaceEditor.image']['js']['/' . $path . '/js/quickedit_image_browser.js'] = []; |
|
9 | + $libraries['quickedit.inPlaceEditor.image']['js']['/'.$path.'/js/quickedit_image_browser.js'] = []; |
|
10 | 10 | } |
11 | 11 | } |
@@ -40,8 +40,7 @@ |
||
40 | 40 | $widget_form['#title'] = ''; |
41 | 41 | $widget_form['entity_id']['#title'] = t('Existing slide'); |
42 | 42 | $widget_form['actions']['ief_reference_save']['#value'] = t('Add'); |
43 | - } |
|
44 | - else { |
|
43 | + } else { |
|
45 | 44 | $widget_form['inline_entity_form']['#ief_labels']['singular'] = 'slide'; |
46 | 45 | } |
47 | 46 | } |
@@ -264,8 +264,7 @@ |
||
264 | 264 | else { |
265 | 265 | $chunk = _color_shift($palette[$base], $default_color_mapping[$base], $chunk, $info['blend_target']); |
266 | 266 | } |
267 | - } |
|
268 | - else { |
|
267 | + } else { |
|
269 | 268 | // Determine the most suitable base color for the next color. |
270 | 269 | |
271 | 270 | // 'a' declarations. Use link. |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | return; |
52 | 52 | } |
53 | 53 | |
54 | - $config = \Drupal::configFactory()->getEditable('color.theme.' . $theme); |
|
54 | + $config = \Drupal::configFactory()->getEditable('color.theme.'.$theme); |
|
55 | 55 | |
56 | 56 | // Resolve palette. |
57 | 57 | if ($scheme != '') { |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | // Make sure enough memory is available. |
67 | 67 | if (isset($info['base_image'])) { |
68 | 68 | // Fetch source image dimensions. |
69 | - $source = drupal_get_path('theme', $theme) . '/' . $info['base_image']; |
|
69 | + $source = drupal_get_path('theme', $theme).'/'.$info['base_image']; |
|
70 | 70 | list($width, $height) = getimagesize($source); |
71 | 71 | |
72 | 72 | // We need at least a copy of the source and a target buffer of the same |
@@ -104,28 +104,28 @@ discard block |
||
104 | 104 | } |
105 | 105 | |
106 | 106 | // Prepare target locations for generated files. |
107 | - $id = $theme . '-' . substr(hash('sha256', serialize($palette) . microtime()), 0, 8); |
|
107 | + $id = $theme.'-'.substr(hash('sha256', serialize($palette).microtime()), 0, 8); |
|
108 | 108 | $paths['color'] = 'public://color'; |
109 | - $paths['target'] = $paths['color'] . '/' . $id; |
|
109 | + $paths['target'] = $paths['color'].'/'.$id; |
|
110 | 110 | foreach ($paths as $path) { |
111 | 111 | \Drupal::service('file_system')->prepareDirectory($path, FileSystemInterface::CREATE_DIRECTORY); |
112 | 112 | } |
113 | - $paths['target'] = $paths['target'] . '/'; |
|
113 | + $paths['target'] = $paths['target'].'/'; |
|
114 | 114 | $paths['id'] = $id; |
115 | - $paths['source'] = drupal_get_path('theme', $theme) . '/'; |
|
115 | + $paths['source'] = drupal_get_path('theme', $theme).'/'; |
|
116 | 116 | $paths['files'] = $paths['map'] = array(); |
117 | 117 | |
118 | 118 | // Save palette and logo location. |
119 | 119 | $config |
120 | 120 | ->set('palette', $palette) |
121 | - ->set('logo', $paths['target'] . 'logo.svg') |
|
121 | + ->set('logo', $paths['target'].'logo.svg') |
|
122 | 122 | ->save(); |
123 | 123 | |
124 | 124 | // Copy over neutral images. |
125 | 125 | foreach ($info['copy'] as $file) { |
126 | 126 | $base = drupal_basename($file); |
127 | - $source = $paths['source'] . $file; |
|
128 | - $filepath = file_unmanaged_copy($source, $paths['target'] . $base); |
|
127 | + $source = $paths['source'].$file; |
|
128 | + $filepath = file_unmanaged_copy($source, $paths['target'].$base); |
|
129 | 129 | $paths['map'][$file] = $base; |
130 | 130 | $paths['files'][] = $filepath; |
131 | 131 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | foreach ($info['css'] as $stylesheet) { |
141 | 141 | // Build a temporary array with CSS files. |
142 | 142 | $files = array(); |
143 | - if (file_exists($paths['source'] . $stylesheet)) { |
|
143 | + if (file_exists($paths['source'].$stylesheet)) { |
|
144 | 144 | $files[] = $stylesheet; |
145 | 145 | } |
146 | 146 | |
@@ -149,11 +149,11 @@ discard block |
||
149 | 149 | // Aggregate @imports recursively for each configured top level CSS file |
150 | 150 | // without optimization. Aggregation and optimization will be |
151 | 151 | // handled by drupal_build_css_cache() only. |
152 | - $style = $css_optimizer->loadFile($paths['source'] . $file, FALSE); |
|
152 | + $style = $css_optimizer->loadFile($paths['source'].$file, FALSE); |
|
153 | 153 | |
154 | 154 | // Return the path to where this CSS file originated from, stripping |
155 | 155 | // off the name of the file at the end of the path. |
156 | - $css_optimizer->rewriteFileURIBasePath = base_path() . dirname($paths['source'] . $file) . '/'; |
|
156 | + $css_optimizer->rewriteFileURIBasePath = base_path().dirname($paths['source'].$file).'/'; |
|
157 | 157 | |
158 | 158 | // Prefix all paths within this CSS file, ignoring absolute paths. |
159 | 159 | $style = preg_replace_callback('/url\([\'"]?(?![a-z]+:|\/+)([^\'")]+)[\'"]?\)/i', array($css_optimizer, 'rewriteFileURI'), $style); |
@@ -161,8 +161,8 @@ discard block |
||
161 | 161 | // Rewrite stylesheet with new colors. |
162 | 162 | $style = _df_tools_color_color_rewrite_stylesheet($theme, $info, $paths, $palette, $style); |
163 | 163 | $base_file = drupal_basename($file); |
164 | - $css[] = $paths['target'] . $base_file; |
|
165 | - _color_save_stylesheet($paths['target'] . $base_file, $style, $paths); |
|
164 | + $css[] = $paths['target'].$base_file; |
|
165 | + _color_save_stylesheet($paths['target'].$base_file, $style, $paths); |
|
166 | 166 | } |
167 | 167 | } |
168 | 168 | |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | |
219 | 219 | // Convert placeholder ids to the format we handle. |
220 | 220 | foreach ($palette_template as $color_id => $color_placeholder) { |
221 | - $palette_template[$color_id] = '#__' . Html::cleanCssIdentifier((string) $color_placeholder, $filter) . '__'; |
|
221 | + $palette_template[$color_id] = '#__'.Html::cleanCssIdentifier((string) $color_placeholder, $filter).'__'; |
|
222 | 222 | } |
223 | 223 | |
224 | 224 | return $palette_template; |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | |
294 | 294 | // Replace paths to images. |
295 | 295 | foreach ($paths['map'] as $before => $after) { |
296 | - $before = base_path() . $paths['source'] . $before; |
|
296 | + $before = base_path().$paths['source'].$before; |
|
297 | 297 | $before = preg_replace('`(^|/)(?!../)([^/]+)/../`', '$1', $before); |
298 | 298 | $output = str_replace($before, $after, $output); |
299 | 299 | } |
@@ -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")) { |
@@ -39,7 +39,7 @@ |
||
39 | 39 | * @return \Robo\Contract\TaskInterface |
40 | 40 | * The task to execute. |
41 | 41 | */ |
42 | - public function configureBehat ($base_url = NULL) { |
|
42 | + public function configureBehat($base_url = NULL) { |
|
43 | 43 | $configuration = []; |
44 | 44 | |
45 | 45 | /** @var Finder $partials */ |