Commit bf7a0842 by Alexander Makarov

removed needFix method

parent da8f1795
......@@ -34,7 +34,7 @@ class MessageFormatter extends \MessageFormatter
return $this->getPattern();
}
if (self::needFix()) {
if (version_compare(PHP_VERSION, '5.5.0', '<')) {
$pattern = self::replaceNamedArguments($this->getPattern(), $args);
$this->setPattern($pattern);
$args = array_values($args);
......@@ -57,7 +57,7 @@ class MessageFormatter extends \MessageFormatter
return $pattern;
}
if (self::needFix()) {
if (version_compare(PHP_VERSION, '5.5.0', '<')) {
$pattern = self::replaceNamedArguments($pattern, $args);
$args = array_values($args);
}
......@@ -114,16 +114,5 @@ class MessageFormatter extends \MessageFormatter
}
return $pattern;
}
/**
* Checks if fix should be applied
*
* @see http://php.net/manual/en/migration55.changed-functions.php
* @return boolean if fix should be applied
*/
private static function needFix()
{
return version_compare(PHP_VERSION, '5.5.0', '<');
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment