From acea86c34d54d24fd9f96f59eaabea646dc09113 Mon Sep 17 00:00:00 2001 From: Florin Patan Date: Sun, 16 Dec 2012 14:02:54 +0200 Subject: [PATCH] Fixed most of the docblocks/unused namespaces --- Locale.php | 8 +++++--- Stub/StubCollator.php | 6 ++++-- Stub/StubIntlDateFormatter.php | 8 +++++--- Stub/StubLocale.php | 1 + Stub/StubNumberFormatter.php | 4 +++- 5 files changed, 18 insertions(+), 9 deletions(-) diff --git a/Locale.php b/Locale.php index 6982a81..271e61d 100644 --- a/Locale.php +++ b/Locale.php @@ -43,7 +43,7 @@ class Locale extends \Locale * * @return array The country names with their codes as keys * - * @throws RuntimeException When the resource bundles cannot be loaded + * @throws \RuntimeException When the resource bundles cannot be loaded */ public static function getDisplayCountries($locale) { @@ -98,7 +98,7 @@ public static function getCountries() * * @return array The language names with their codes as keys * - * @throws RuntimeException When the resource bundles cannot be loaded + * @throws \RuntimeException When the resource bundles cannot be loaded */ public static function getDisplayLanguages($locale) { @@ -148,8 +148,10 @@ public static function getLanguages() * Returns the locale names for a locale * * @param string $locale The locale to use for the locale names + * * @return array The locale names with their codes as keys - * @throws RuntimeException When the resource bundles cannot be loaded + * + * @throws \RuntimeException When the resource bundles cannot be loaded */ public static function getDisplayLocales($locale) { diff --git a/Stub/StubCollator.php b/Stub/StubCollator.php index 7f46288..10d354d 100644 --- a/Stub/StubCollator.php +++ b/Stub/StubCollator.php @@ -74,6 +74,8 @@ public function __construct($locale) * * @param string $locale The locale code * + * @return StubCollator + * * @throws MethodArgumentValueNotImplementedException When $locale different than 'en' is passed */ public static function create($locale) @@ -84,8 +86,8 @@ public static function create($locale) /** * Sort array maintaining index association * - * @param array &$array Input array - * @param array $sortFlag Flags for sorting, can be one of the following: + * @param array &$array Input array + * @param integer $sortFlag Flags for sorting, can be one of the following: * StubCollator::SORT_REGULAR - compare items normally (don't change types) * StubCollator::SORT_NUMERIC - compare items numerically * StubCollator::SORT_STRING - compare items as strings diff --git a/Stub/StubIntlDateFormatter.php b/Stub/StubIntlDateFormatter.php index e14300b..ebd80c1 100644 --- a/Stub/StubIntlDateFormatter.php +++ b/Stub/StubIntlDateFormatter.php @@ -91,7 +91,7 @@ class StubIntlDateFormatter private $pattern; /** - * @var DateTimeZone + * @var \DateTimeZone */ private $dateTimeZone; @@ -150,6 +150,8 @@ public function __construct($locale, $datetype, $timetype, $timezone = null, $ca * One of the calendar constants. * @param string $pattern Optional pattern to use when formatting * + * @return StubIntlDateFormatter + * * @see http://www.php.net/manual/en/intldateformatter.create.php * @see http://userguide.icu-project.org/formatparse/datetime * @@ -169,7 +171,7 @@ public static function create($locale, $datetype, $timetype, $timezone = null, $ * * @see http://www.php.net/manual/en/intldateformatter.format.php * - * @throws NotImplementedException If one of the formatting characters is not implemented + * @throws MethodArgumentValueNotImplementedException If one of the formatting characters is not implemented */ public function format($timestamp) { @@ -494,7 +496,7 @@ public function setTimeZoneId($timeZoneId) * * @param int $timestamp * - * @return DateTime + * @return \DateTime */ protected function createDateTime($timestamp) { diff --git a/Stub/StubLocale.php b/Stub/StubLocale.php index 9f76a9e..7465aa2 100644 --- a/Stub/StubLocale.php +++ b/Stub/StubLocale.php @@ -430,6 +430,7 @@ public static function getScript($locale) * @see http://www.php.net/manual/en/locale.lookup.php * * @throws \RuntimeException When the intl extension is not loaded + * @throws MethodNotImplementedException */ public static function lookup(array $langtag, $locale, $canonicalize = false, $default = null) { diff --git a/Stub/StubNumberFormatter.php b/Stub/StubNumberFormatter.php index 4cf8605..0d1ba14 100644 --- a/Stub/StubNumberFormatter.php +++ b/Stub/StubNumberFormatter.php @@ -266,6 +266,8 @@ public function __construct($locale = 'en', $style = null, $pattern = null) * NumberFormat::PATTERN_RULEBASED. It must conform to the syntax * described in the ICU DecimalFormat or ICU RuleBasedNumberFormat documentation * + * @return StubNumberFormatter + * * @see http://www.php.net/manual/en/numberformatter.create.php * @see http://www.icu-project.org/apiref/icu4c/classDecimalFormat.html#_details * @see http://www.icu-project.org/apiref/icu4c/classRuleBasedNumberFormat.html#_details @@ -324,7 +326,7 @@ public function formatCurrency($value, $currency) * * @see http://www.php.net/manual/en/numberformatter.format.php * - * @throws RuntimeException If the method is called with the class $style 'CURRENCY' + * @throws \RuntimeException If the method is called with the class $style 'CURRENCY' * @throws MethodArgumentNotImplementedException If the $type is different than TYPE_DEFAULT */ public function format($value, $type = self::TYPE_DEFAULT)