Skip to content

Commit 8cbab84

Browse files
committed
Merge branch '2.3' into 2.7
* 2.3: Update copyright year [2.3] Static Code Analysis for Components
2 parents e7e95de + 5e85e27 commit 8cbab84

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
@@ -79,11 +79,7 @@ public function format(MessageCatalogue $messages, $domain = 'messages')
7979
1, 4, 0, 0 // Unicode version
8080
);
8181

82-
$output = $header
83-
.$root
84-
.$data;
85-
86-
return $output;
82+
return $header.$root.$data;
8783
}
8884

8985
private function writePadding($data)
@@ -97,9 +93,7 @@ private function writePadding($data)
9793

9894
private function getPosition($data)
9995
{
100-
$position = (strlen($data) + 28) / 4;
101-
102-
return $position;
96+
return (strlen($data) + 28) / 4;
10397
}
10498

10599
/**

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)