@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | public function prepareRow(Row $row) { |
18 | 18 | // Prefix the state per the normal Address schema. |
19 | 19 | if ($state = $row->getSourceProperty('Address State')) { |
20 | - $row->setSourceProperty('Address State', 'US-' . $state); |
|
20 | + $row->setSourceProperty('Address State', 'US-'.$state); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | // Use a cached geolocation if possible. |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $zip = $row->getSourceProperty('Address Zip'); |
35 | 35 | |
36 | 36 | if ($address && $city && $zip && $state) { |
37 | - $address2 = $address2 ? $address2 . "\n" : ''; |
|
37 | + $address2 = $address2 ? $address2."\n" : ''; |
|
38 | 38 | $address_string = "$address\n$address2$city, $state $zip\nUS"; |
39 | 39 | if ($collection = \Drupal::service('geocoder')->geocode($address_string, ['googlemaps'])) { |
40 | 40 | // Set our value in a similar way to Geofield's LatLon Widget. |
@@ -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 | } |
@@ -48,7 +48,7 @@ |
||
48 | 48 | if ($migration != null) { |
49 | 49 | $definition = $migration->getPluginDefinition(); |
50 | 50 | $dump = Yaml::dump($definition); |
51 | - $file_url = $destination . $migration->id() . '.yml'; |
|
51 | + $file_url = $destination.$migration->id().'.yml'; |
|
52 | 52 | $message = t('Export migration @name?', ['@name' => $name]); |
53 | 53 | if (drush_confirm($message) && $data = file_save_data($dump, $file_url)) { |
54 | 54 | drush_print(t('File saved: @file', ['@file' => $data->getFileUri()])); |
@@ -33,7 +33,7 @@ |
||
33 | 33 | */ |
34 | 34 | protected function setImageProperty(Row $row, $source_property) { |
35 | 35 | if ($value = $row->getSourceProperty($source_property)) { |
36 | - $path = dirname($this->configuration['path']) . '/images/' . $value; |
|
36 | + $path = dirname($this->configuration['path']).'/images/'.$value; |
|
37 | 37 | $data = file_get_contents($path); |
38 | 38 | $uri = file_build_uri($value); |
39 | 39 | $file = file_save_data($data, $uri); |
@@ -35,7 +35,7 @@ |
||
35 | 35 | |
36 | 36 | // Point source path to local CSV file. |
37 | 37 | if ($local_csv === TRUE) { |
38 | - $migration['source']['path'] = $path . $prefix . "." . $entity_type . "." . $type . '.csv'; |
|
38 | + $migration['source']['path'] = $path.$prefix.".".$entity_type.".".$type.'.csv'; |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | // Set content type to current bundle. |
@@ -22,7 +22,7 @@ |
||
22 | 22 | |
23 | 23 | // Reset the library path to work around a bug with the Libraries module not |
24 | 24 | // incorporating the ['path'] when calling libraries_get_path(). |
25 | - $libraries['lite']['library path'] = libraries_get_path('lite') . '/' . $libraries['lite']['path']; |
|
25 | + $libraries['lite']['library path'] = libraries_get_path('lite').'/'.$libraries['lite']['path']; |
|
26 | 26 | |
27 | 27 | // Hardcode the version number because the raw source files do not contain |
28 | 28 | // any version information. |
@@ -76,13 +76,13 @@ discard block |
||
76 | 76 | } |
77 | 77 | try { |
78 | 78 | $module_info = \Drupal::moduleHandler()->getModule($input); |
79 | - $destination_dir = DRUPAL_ROOT . '/' . $module_info->getPath() . '/config/install/'; |
|
80 | - $source = DRUPAL_ROOT . '/' . $destination_storage->getFilePath($config); |
|
79 | + $destination_dir = DRUPAL_ROOT.'/'.$module_info->getPath().'/config/install/'; |
|
80 | + $source = DRUPAL_ROOT.'/'.$destination_storage->getFilePath($config); |
|
81 | 81 | // Create /config/install directory if it does not exist. |
82 | 82 | if (!file_exists($destination_dir)) { |
83 | 83 | mkdir($destination_dir, 0755, true); |
84 | 84 | } |
85 | - $destination = $destination_dir . basename($source); |
|
85 | + $destination = $destination_dir.basename($source); |
|
86 | 86 | if (!copy($source, $destination)) { |
87 | 87 | drush_log(dt('New copy from @source to @destination failed.', ['@source' => $source, '@destination' => $destination]), LogLevel::ERROR); |
88 | 88 | } |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | break; |
99 | 99 | case 'update': |
100 | 100 | foreach ($list as $config) { |
101 | - $source = DRUPAL_ROOT . '/' . $destination_storage->getFilePath($config); |
|
101 | + $source = DRUPAL_ROOT.'/'.$destination_storage->getFilePath($config); |
|
102 | 102 | |
103 | 103 | $instances = _df_tools_config_find_config_instances($destination_storage, $config); |
104 | 104 | $choice = drush_choice($instances, dt('Choose update destination for @config.', ['@config' => $config])); |
@@ -152,8 +152,8 @@ discard block |
||
152 | 152 | |
153 | 153 | $iterator = new RecursiveDirectoryIterator(DRUPAL_ROOT, FilesystemIterator::FOLLOW_SYMLINKS); |
154 | 154 | $files = []; |
155 | - foreach(new RecursiveIteratorIterator($iterator) as $file){ |
|
156 | - if(strpos($file, $filename) !== FALSE && strpos($file, DRUPAL_ROOT . '/sites/') === FALSE){ |
|
155 | + foreach (new RecursiveIteratorIterator($iterator) as $file) { |
|
156 | + if (strpos($file, $filename) !== FALSE && strpos($file, DRUPAL_ROOT.'/sites/') === FALSE) { |
|
157 | 157 | $files[] = (string) $file; |
158 | 158 | } |
159 | 159 | } |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | $source = $migration->getSourcePlugin(); |
26 | 26 | /** @var Drupal\migrate_source_csv\CSVFileObject $iterator */ |
27 | 27 | $iterator = $source->initializeIterator(); |
28 | - $filename = $iterator->getPath() . '/' . $iterator->getFilename(); |
|
28 | + $filename = $iterator->getPath().'/'.$iterator->getFilename(); |
|
29 | 29 | |
30 | 30 | /** @var \Drupal\migrate\Plugin\migrate\destination\EntityContentBase $destination_plugin */ |
31 | 31 | $destination_plugin = $migration->getDestinationPlugin(); |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | batch_set($batch); |
225 | 225 | // Set a batch to update configuration as well. |
226 | 226 | if ($batch = locale_config_batch_update_components($options, $langcodes)) { |
227 | - $batch['file'] = drupal_get_path('module', 'df_tools_translation') . '/df_tools_translation.batch.inc'; |
|
227 | + $batch['file'] = drupal_get_path('module', 'df_tools_translation').'/df_tools_translation.batch.inc'; |
|
228 | 228 | batch_set($batch); |
229 | 229 | } |
230 | 230 | } |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | |
251 | 251 | // Import each file. |
252 | 252 | foreach ($langcodes as $langcode) { |
253 | - $filepath = DRUPAL_ROOT . '/' . $path . '/translations/' . $langcode . '.po'; |
|
253 | + $filepath = DRUPAL_ROOT.'/'.$path.'/translations/'.$langcode.'.po'; |
|
254 | 254 | if (file_exists($filepath)) { |
255 | 255 | \Drupal::moduleHandler()->loadInclude('locale', 'bulk.inc'); |
256 | 256 | \Drupal::moduleHandler()->loadInclude('locale', 'translation.inc'); |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | ]); |
265 | 265 | |
266 | 266 | $original_file = (object) [ |
267 | - 'filename' => $langcode . '.po', |
|
267 | + 'filename' => $langcode.'.po', |
|
268 | 268 | 'uri' => $filepath |
269 | 269 | ]; |
270 | 270 | $file = locale_translate_file_attach_properties($original_file, $options); |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | if ($langcode == 'en') { |
308 | 308 | $langcode = ''; |
309 | 309 | } |
310 | - $url = \Drupal\Core\Url::fromUri('base:/' . $langcode . $alias); |
|
310 | + $url = \Drupal\Core\Url::fromUri('base:/'.$langcode.$alias); |
|
311 | 311 | |
312 | 312 | $current_name = [ |
313 | 313 | '#markup' => t($language->getName()) |
@@ -26,7 +26,7 @@ |
||
26 | 26 | } |
27 | 27 | |
28 | 28 | $form['description'] = [ |
29 | - '#markup' => '<p>' . t('Image derivatives can be created in bulk manually to remove the need for Drupal to create them on page load.') . '</p>', |
|
29 | + '#markup' => '<p>'.t('Image derivatives can be created in bulk manually to remove the need for Drupal to create them on page load.').'</p>', |
|
30 | 30 | ]; |
31 | 31 | $form['image_styles'] = [ |
32 | 32 | '#type' => 'checkboxes', |