Skip to content

Commit a5fe2e9

Browse files
committed
fixed CS
1 parent 44ac678 commit a5fe2e9

38 files changed

+130
-121
lines changed

DateFormatter/DateFormat/AmPmTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function getReverseMatchingRegExp($length)
4040
public function extractDateOptions($matched, $length)
4141
{
4242
return array(
43-
'marker' => $matched
43+
'marker' => $matched,
4444
);
4545
}
4646
}

DateFormatter/DateFormat/FullTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ protected function normalizeArray(array $data)
270270

271271
$ret[$key[0]] = array(
272272
'value' => $value,
273-
'pattern' => $key
273+
'pattern' => $key,
274274
);
275275
}
276276

DateFormatter/DateFormat/Hour1200Transformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function extractDateOptions($matched, $length)
5656
{
5757
return array(
5858
'hour' => (int) $matched,
59-
'hourInstance' => $this
59+
'hourInstance' => $this,
6060
);
6161
}
6262
}

DateFormatter/DateFormat/Hour1201Transformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function extractDateOptions($matched, $length)
5656
{
5757
return array(
5858
'hour' => (int) $matched,
59-
'hourInstance' => $this
59+
'hourInstance' => $this,
6060
);
6161
}
6262
}

DateFormatter/DateFormat/Hour2400Transformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function extractDateOptions($matched, $length)
5555
{
5656
return array(
5757
'hour' => (int) $matched,
58-
'hourInstance' => $this
58+
'hourInstance' => $this,
5959
);
6060
}
6161
}

DateFormatter/DateFormat/Hour2401Transformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function extractDateOptions($matched, $length)
5858
{
5959
return array(
6060
'hour' => (int) $matched,
61-
'hourInstance' => $this
61+
'hourInstance' => $this,
6262
);
6363
}
6464
}

DateFormatter/DateFormat/MonthTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class MonthTransformer extends Transformer
3333
'September',
3434
'October',
3535
'November',
36-
'December'
36+
'December',
3737
);
3838

3939
/**

DateFormatter/DateFormat/TimeZoneTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function getReverseMatchingRegExp($length)
5353
public function extractDateOptions($matched, $length)
5454
{
5555
return array(
56-
'timezone' => self::getEtcTimeZoneId($matched)
56+
'timezone' => self::getEtcTimeZoneId($matched),
5757
);
5858
}
5959

Intl.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,5 +207,7 @@ private static function getBundleReader()
207207
/**
208208
* This class must not be instantiated.
209209
*/
210-
private function __construct() {}
210+
private function __construct()
211+
{
212+
}
211213
}

Locale.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,7 @@ public static function getFallback($locale)
4444
/**
4545
* This class must not be instantiated.
4646
*/
47-
private function __construct() {}
47+
private function __construct()
48+
{
49+
}
4850
}

NumberFormatter/NumberFormatter.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ class NumberFormatter
154154
private $attributes = array(
155155
self::FRACTION_DIGITS => 0,
156156
self::GROUPING_USED => 1,
157-
self::ROUNDING_MODE => self::ROUND_HALFEVEN
157+
self::ROUNDING_MODE => self::ROUND_HALFEVEN,
158158
);
159159

160160
/**
@@ -171,7 +171,7 @@ class NumberFormatter
171171
*/
172172
private static $supportedStyles = array(
173173
'CURRENCY' => self::CURRENCY,
174-
'DECIMAL' => self::DECIMAL
174+
'DECIMAL' => self::DECIMAL,
175175
);
176176

177177
/**
@@ -182,7 +182,7 @@ class NumberFormatter
182182
private static $supportedAttributes = array(
183183
'FRACTION_DIGITS' => self::FRACTION_DIGITS,
184184
'GROUPING_USED' => self::GROUPING_USED,
185-
'ROUNDING_MODE' => self::ROUNDING_MODE
185+
'ROUNDING_MODE' => self::ROUNDING_MODE,
186186
);
187187

188188
/**
@@ -195,7 +195,7 @@ class NumberFormatter
195195
private static $roundingModes = array(
196196
'ROUND_HALFEVEN' => self::ROUND_HALFEVEN,
197197
'ROUND_HALFDOWN' => self::ROUND_HALFDOWN,
198-
'ROUND_HALFUP' => self::ROUND_HALFUP
198+
'ROUND_HALFUP' => self::ROUND_HALFUP,
199199
);
200200

201201
/**
@@ -209,7 +209,7 @@ class NumberFormatter
209209
private static $phpRoundingMap = array(
210210
self::ROUND_HALFDOWN => \PHP_ROUND_HALF_DOWN,
211211
self::ROUND_HALFEVEN => \PHP_ROUND_HALF_EVEN,
212-
self::ROUND_HALFUP => \PHP_ROUND_HALF_UP
212+
self::ROUND_HALFUP => \PHP_ROUND_HALF_UP,
213213
);
214214

215215
/**
@@ -219,7 +219,7 @@ class NumberFormatter
219219
*/
220220
private static $int32Range = array(
221221
'positive' => 2147483647,
222-
'negative' => -2147483648
222+
'negative' => -2147483648,
223223
);
224224

225225
/**
@@ -229,7 +229,7 @@ class NumberFormatter
229229
*/
230230
private static $int64Range = array(
231231
'positive' => 9223372036854775807,
232-
'negative' => -9223372036854775808
232+
'negative' => -9223372036854775808,
233233
);
234234

235235
private static $enSymbols = array(

ResourceBundle/Compiler/BundleCompiler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class BundleCompiler implements BundleCompilerInterface
3838
*/
3939
public function __construct($genrb = 'genrb', $envVars = '')
4040
{
41-
exec('which ' . $genrb, $output, $status);
41+
exec('which '.$genrb, $output, $status);
4242

4343
if (0 !== $status) {
4444
throw new RuntimeException(sprintf(
@@ -47,7 +47,7 @@ public function __construct($genrb = 'genrb', $envVars = '')
4747
));
4848
}
4949

50-
$this->genrb = ($envVars ? $envVars . ' ' : '') . $genrb;
50+
$this->genrb = ($envVars ? $envVars.' ' : '').$genrb;
5151
}
5252

5353
/**

ResourceBundle/Reader/BufferedBundleReader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function __construct(BundleReaderInterface $reader, $bufferSize)
4545
*/
4646
public function read($path, $locale)
4747
{
48-
$hash = $path . '//' . $locale;
48+
$hash = $path.'//'.$locale;
4949

5050
if (!isset($this->buffer[$hash])) {
5151
$this->buffer[$hash] = $this->reader->read($path, $locale);

ResourceBundle/Transformer/BundleTransformer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function compileBundles(CompilationContextInterface $context)
5757
$filesystem->mkdir($context->getBinaryDir());
5858

5959
foreach ($this->rules as $rule) {
60-
$filesystem->mkdir($context->getBinaryDir() . '/' . $rule->getBundleName());
60+
$filesystem->mkdir($context->getBinaryDir().'/'.$rule->getBundleName());
6161

6262
$resources = (array) $rule->beforeCompile($context);
6363

@@ -70,7 +70,7 @@ public function compileBundles(CompilationContextInterface $context)
7070
));
7171
}
7272

73-
$compiler->compile($resource, $context->getBinaryDir() . '/' . $rule->getBundleName());
73+
$compiler->compile($resource, $context->getBinaryDir().'/'.$rule->getBundleName());
7474
}
7575

7676
$rule->afterCompile($context);
@@ -86,11 +86,11 @@ public function createStubs(StubbingContextInterface $context)
8686
$filesystem->mkdir($context->getStubDir());
8787

8888
foreach ($this->rules as $rule) {
89-
$filesystem->mkdir($context->getStubDir() . '/' . $rule->getBundleName());
89+
$filesystem->mkdir($context->getStubDir().'/'.$rule->getBundleName());
9090

9191
$data = $rule->beforeCreateStub($context);
9292

93-
$phpWriter->write($context->getStubDir() . '/' . $rule->getBundleName(), 'en', $data);
93+
$phpWriter->write($context->getStubDir().'/'.$rule->getBundleName(), 'en', $data);
9494

9595
$rule->afterCreateStub($context);
9696
}

ResourceBundle/Transformer/Rule/CurrencyBundleTransformationRule.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ public function beforeCompile(CompilationContextInterface $context)
4343
// in ICU <= 4.2
4444
if (IcuVersion::compare($context->getIcuVersion(), '4.2', '<=', 1)) {
4545
return array(
46-
$context->getSourceDir() . '/misc/supplementalData.txt',
47-
$context->getSourceDir() . '/locales'
46+
$context->getSourceDir().'/misc/supplementalData.txt',
47+
$context->getSourceDir().'/locales',
4848
);
4949
}
5050

51-
return $context->getSourceDir() . '/curr';
51+
return $context->getSourceDir().'/curr';
5252
}
5353

5454
/**
@@ -59,8 +59,8 @@ public function afterCompile(CompilationContextInterface $context)
5959
// \ResourceBundle does not like locale names with uppercase chars, so rename
6060
// the resource file
6161
// See: http://bugs.php.net/bug.php?id=54025
62-
$fileName = $context->getBinaryDir() . '/curr/supplementalData.res';
63-
$fileNameLower = $context->getBinaryDir() . '/curr/supplementaldata.res';
62+
$fileName = $context->getBinaryDir().'/curr/supplementalData.res';
63+
$fileNameLower = $context->getBinaryDir().'/curr/supplementaldata.res';
6464

6565
$context->getFilesystem()->rename($fileName, $fileNameLower);
6666
}

ResourceBundle/Transformer/Rule/LanguageBundleTransformationRule.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ public function beforeCompile(CompilationContextInterface $context)
4040
{
4141
// The language data is contained in the locales bundle in ICU <= 4.2
4242
if (IcuVersion::compare($context->getIcuVersion(), '4.2', '<=', 1)) {
43-
return $context->getSourceDir() . '/locales';
43+
return $context->getSourceDir().'/locales';
4444
}
4545

46-
return $context->getSourceDir() . '/lang';
46+
return $context->getSourceDir().'/lang';
4747
}
4848

4949
/**

ResourceBundle/Transformer/Rule/LocaleBundleTransformationRule.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function getBundleName()
5555
*/
5656
public function beforeCompile(CompilationContextInterface $context)
5757
{
58-
$tempDir = sys_get_temp_dir() . '/icu-data-locales';
58+
$tempDir = sys_get_temp_dir().'/icu-data-locales';
5959

6060
$context->getFilesystem()->remove($tempDir);
6161
$context->getFilesystem()->mkdir($tempDir);
@@ -70,7 +70,7 @@ public function beforeCompile(CompilationContextInterface $context)
7070
*/
7171
public function afterCompile(CompilationContextInterface $context)
7272
{
73-
$context->getFilesystem()->remove(sys_get_temp_dir() . '/icu-data-locales');
73+
$context->getFilesystem()->remove(sys_get_temp_dir().'/icu-data-locales');
7474
}
7575

7676
/**
@@ -92,17 +92,17 @@ public function afterCreateStub(StubbingContextInterface $context)
9292

9393
private function scanLocales(CompilationContextInterface $context)
9494
{
95-
$tempDir = sys_get_temp_dir() . '/icu-data-locales-source';
95+
$tempDir = sys_get_temp_dir().'/icu-data-locales-source';
9696

9797
$context->getFilesystem()->remove($tempDir);
9898
$context->getFilesystem()->mkdir($tempDir);
9999

100100
// Temporarily generate the resource bundles
101-
$context->getCompiler()->compile($context->getSourceDir() . '/locales', $tempDir);
101+
$context->getCompiler()->compile($context->getSourceDir().'/locales', $tempDir);
102102

103103
// Discover the list of supported locales, which are the names of the resource
104104
// bundles in the "locales" directory
105-
$locales = glob($tempDir . '/*.res');
105+
$locales = glob($tempDir.'/*.res');
106106

107107
// Remove file extension and sort
108108
array_walk($locales, function (&$locale) { $locale = basename($locale, '.res'); });
@@ -112,7 +112,7 @@ private function scanLocales(CompilationContextInterface $context)
112112
foreach ($locales as $key => $locale) {
113113
// Delete all aliases from the list
114114
// i.e., "az_AZ" is an alias for "az_Latn_AZ"
115-
$content = file_get_contents($context->getSourceDir() . '/locales/' . $locale . '.txt');
115+
$content = file_get_contents($context->getSourceDir().'/locales/'.$locale.'.txt');
116116

117117
// The key "%%ALIAS" is not accessible through the \ResourceBundle class,
118118
// so look in the original .txt file instead
@@ -129,7 +129,7 @@ private function scanLocales(CompilationContextInterface $context)
129129
}
130130

131131
if (null === $bundle) {
132-
throw new RuntimeException('The resource bundle for locale ' . $locale . ' could not be loaded from directory ' . $tempDir);
132+
throw new RuntimeException('The resource bundle for locale '.$locale.' could not be loaded from directory '.$tempDir);
133133
}
134134

135135
// There seems to be no other way for identifying all keys in this specific

ResourceBundle/Transformer/Rule/RegionBundleTransformationRule.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ public function beforeCompile(CompilationContextInterface $context)
4040
{
4141
// The region data is contained in the locales bundle in ICU <= 4.2
4242
if (IcuVersion::compare($context->getIcuVersion(), '4.2', '<=', 1)) {
43-
return $context->getSourceDir() . '/locales';
43+
return $context->getSourceDir().'/locales';
4444
}
4545

46-
return $context->getSourceDir() . '/region';
46+
return $context->getSourceDir().'/region';
4747
}
4848

4949
/**

ResourceBundle/Util/RecursiveArrayAccess.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static function get($array, array $indices)
3535
continue;
3636
}
3737
}
38-
38+
3939
throw new OutOfBoundsException(sprintf(
4040
'The index %s does not exist.',
4141
$index
@@ -45,5 +45,7 @@ public static function get($array, array $indices)
4545
return $array;
4646
}
4747

48-
private function __construct() {}
48+
private function __construct()
49+
{
50+
}
4951
}

ResourceBundle/Writer/TextBundleWriter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ private function writeResource($file, $value, $indentation, $requireBraces = tru
8787
$intValues = count($value) === count(array_filter($value, 'is_int'));
8888

8989
$keys = array_keys($value);
90-
90+
9191
// check that the keys are 0-indexed and ascending
9292
$intKeys = $keys === range(0, count($keys) - 1);
9393

Resources/bin/autoload.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
$autoload = __DIR__ . '/../../vendor/autoload.php';
12+
$autoload = __DIR__.'/../../vendor/autoload.php';
1313

1414
if (!file_exists($autoload)) {
1515
bailout('You should run "composer install --dev" in the component before running this script.');

Resources/bin/copy-stubs-to-component.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
use Symfony\Component\Filesystem\Filesystem;
1313
use Symfony\Component\Icu\IcuData;
1414

15-
require_once __DIR__ . '/common.php';
16-
require_once __DIR__ . '/autoload.php';
15+
require_once __DIR__.'/common.php';
16+
require_once __DIR__.'/autoload.php';
1717

1818
if (1 !== $GLOBALS['argc']) {
1919
bailout(<<<MESSAGE
@@ -31,7 +31,7 @@
3131
}
3232

3333
echo LINE;
34-
echo centered("ICU Resource Bundle Stub Update") . "\n";
34+
echo centered("ICU Resource Bundle Stub Update")."\n";
3535
echo LINE;
3636

3737
if (!class_exists('\Symfony\Component\Icu\IcuData')) {
@@ -46,7 +46,7 @@
4646

4747
$filesystem = new Filesystem();
4848

49-
$sourceDir = sys_get_temp_dir() . '/icu-stubs';
49+
$sourceDir = sys_get_temp_dir().'/icu-stubs';
5050
$targetDir = IcuData::getResourceDirectory();
5151

5252
if (!$filesystem->exists($sourceDir)) {

0 commit comments

Comments
 (0)