refactor src/Symfony/Component/Translation/Loader/MoFileLoader.php

This commit is contained in:
James Michael DuPont 2012-09-27 19:49:42 +02:00 committed by Fabien Potencier
parent 5fff62644f
commit 4aecda3a93

View File

@ -90,18 +90,13 @@ class MoFileLoader extends ArrayLoader implements LoaderInterface
throw new \InvalidArgumentException("MO stream content has an invalid format.");
}
$header = array(
'formatRevision' => null,
'count' => null,
'offsetId' => null,
'offsetTranslated' => null,
'sizeHashes' => null,
'offsetHashes' => null,
);
foreach ($header as &$value) {
$value = $this->readLong($stream, $isBigEndian);
}
extract($header);
$formatRevision = $this->readLong($stream, $isBigEndian);
$count = $this->readLong($stream, $isBigEndian);
$offsetId = $this->readLong($stream, $isBigEndian);
$offsetTranslated = $this->readLong($stream, $isBigEndian);
$sizeHashes = $this->readLong($stream, $isBigEndian);
$offsetHashes = $this->readLong($stream, $isBigEndian);
$messages = array();
for ($i = 0; $i < $count; $i++) {