comparison vendor/symfony/translation/Dumper/CsvFileDumper.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 1fec387a4317
children
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
24 private $enclosure = '"'; 24 private $enclosure = '"';
25 25
26 /** 26 /**
27 * {@inheritdoc} 27 * {@inheritdoc}
28 */ 28 */
29 public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) 29 public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = [])
30 { 30 {
31 $handle = fopen('php://memory', 'rb+'); 31 $handle = fopen('php://memory', 'r+b');
32 32
33 foreach ($messages->all($domain) as $source => $target) { 33 foreach ($messages->all($domain) as $source => $target) {
34 fputcsv($handle, array($source, $target), $this->delimiter, $this->enclosure); 34 fputcsv($handle, [$source, $target], $this->delimiter, $this->enclosure);
35 } 35 }
36 36
37 rewind($handle); 37 rewind($handle);
38 $output = stream_get_contents($handle); 38 $output = stream_get_contents($handle);
39 fclose($handle); 39 fclose($handle);