Skip to content

Commit bc0b666

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: updated copyright year Update copyright year [2.3] Static Code Analysis for Components
2 parents c1db87c + 8cbab84 commit bc0b666

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

Dumper/IcuResFileDumper.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,7 @@ public function formatCatalogue(MessageCatalogue $messages, $domain, array $opti
8989
1, 4, 0, 0 // Unicode version
9090
);
9191

92-
$output = $header
93-
.$root
94-
.$data;
95-
96-
return $output;
92+
return $header.$root.$data;
9793
}
9894

9995
private function writePadding($data)
@@ -107,9 +103,7 @@ private function writePadding($data)
107103

108104
private function getPosition($data)
109105
{
110-
$position = (strlen($data) + 28) / 4;
111-
112-
return $position;
106+
return (strlen($data) + 28) / 4;
113107
}
114108

115109
/**

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

Writer/TranslationWriter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ public function writeTranslations(MessageCatalogue $catalogue, $format, $options
7777
// get the right dumper
7878
$dumper = $this->dumpers[$format];
7979

80-
if (isset($options['path']) && !is_dir($options['path'])) {
81-
mkdir($options['path'], 0777, true);
80+
if (isset($options['path']) && !is_dir($options['path']) && !@mkdir($options['path'], 0777, true) && !is_dir($options['path'])) {
81+
throw new \RuntimeException(sprintf('Translation Writer was not able to create directory "%s"', $options['path']));
8282
}
8383

8484
// save

0 commit comments

Comments
 (0)