From bf7a0842249e04e33063c4fa21c9451bb7fa4eb9 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Thu, 17 Oct 2013 01:04:42 +0400 Subject: [PATCH] removed needFix method --- framework/yii/i18n/MessageFormatter.php | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/framework/yii/i18n/MessageFormatter.php b/framework/yii/i18n/MessageFormatter.php index 8479425..eb85773 100644 --- a/framework/yii/i18n/MessageFormatter.php +++ b/framework/yii/i18n/MessageFormatter.php @@ -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