From 4db0752894c1723ac48630a16a86512614eb0fba Mon Sep 17 00:00:00 2001 From: Eriksen Costa Date: Wed, 27 Apr 2011 02:01:12 -0300 Subject: [PATCH] replaced 'bool' with 'Boolean' --- .../Templating/GlobalVariables.php | 2 +- src/Symfony/Component/BrowserKit/Cookie.php | 4 +-- .../Console/Input/InputInterface.php | 2 +- .../Core/EventListener/ResizeFormListener.php | 2 +- .../Form/Extension/Core/Type/CheckboxType.php | 2 +- .../Form/Extension/Core/Type/RadioType.php | 2 +- .../Stub/DateFormat/FullTransformer.php | 4 +-- .../Component/Locale/Stub/StubCollator.php | 16 +++++------ .../Locale/Stub/StubIntlDateFormatter.php | 12 ++++---- .../Component/Locale/Stub/StubLocale.php | 4 +-- .../Locale/Stub/StubNumberFormatter.php | 28 +++++++++---------- .../Serializer/Encoder/XmlEncoder.php | 2 +- .../Tests/Component/HttpKernel/KernelTest.php | 2 +- 13 files changed, 41 insertions(+), 41 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php b/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php index 8eeb010fb3..08d32c86cf 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php @@ -105,6 +105,6 @@ class GlobalVariables */ public function getDebug() { - return (bool) $this->container->getParameter('kernel.debug'); + return (Boolean) $this->container->getParameter('kernel.debug'); } } diff --git a/src/Symfony/Component/BrowserKit/Cookie.php b/src/Symfony/Component/BrowserKit/Cookie.php index 82bbb30470..ebb5a2d334 100644 --- a/src/Symfony/Component/BrowserKit/Cookie.php +++ b/src/Symfony/Component/BrowserKit/Cookie.php @@ -38,8 +38,8 @@ class Cookie * @param string $expires The time the cookie expires * @param string $path The path on the server in which the cookie will be available on * @param string $domain The domain that the cookie is available - * @param bool $secure Indicates that the cookie should only be transmitted over a secure HTTPS connection from the client - * @param bool $httponly The cookie httponly flag + * @param Boolean $secure Indicates that the cookie should only be transmitted over a secure HTTPS connection from the client + * @param Boolean $httponly The cookie httponly flag * * @api */ diff --git a/src/Symfony/Component/Console/Input/InputInterface.php b/src/Symfony/Component/Console/Input/InputInterface.php index b9d427a31e..d5023eb073 100644 --- a/src/Symfony/Component/Console/Input/InputInterface.php +++ b/src/Symfony/Component/Console/Input/InputInterface.php @@ -97,7 +97,7 @@ interface InputInterface /** * Is this input means interactive? * - * @return bool + * @return Boolean */ function isInteractive(); } diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php index 4e284f083d..3c2f1fffe3 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php @@ -37,7 +37,7 @@ class ResizeFormListener implements EventSubscriberInterface private $type; /** - * @var bool + * @var Boolean */ private $resizeOnBind; diff --git a/src/Symfony/Component/Form/Extension/Core/Type/CheckboxType.php b/src/Symfony/Component/Form/Extension/Core/Type/CheckboxType.php index c9bac56660..beb9f98e5a 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/CheckboxType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/CheckboxType.php @@ -28,7 +28,7 @@ class CheckboxType extends AbstractType public function buildView(FormView $view, FormInterface $form) { $view->set('value', $form->getAttribute('value')); - $view->set('checked', (bool)$form->getData()); + $view->set('checked', (Boolean) $form->getData()); } public function getDefaultOptions(array $options) diff --git a/src/Symfony/Component/Form/Extension/Core/Type/RadioType.php b/src/Symfony/Component/Form/Extension/Core/Type/RadioType.php index 8a2c3b67a4..baecb688b2 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/RadioType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/RadioType.php @@ -28,7 +28,7 @@ class RadioType extends AbstractType public function buildView(FormView $view, FormInterface $form) { $view->set('value', $form->getAttribute('value')); - $view->set('checked', (bool)$form->getData()); + $view->set('checked', (Boolean) $form->getData()); if ($view->hasParent()) { $view->set('name', $view->getParent()->get('name')); diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php index 33814787e7..735bb7207f 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php @@ -188,7 +188,7 @@ class FullTransformer * Check if the first char of a string is a single quote * * @param string $quoteMatch The string to check - * @return bool true if matches, false otherwise + * @return Boolean true if matches, false otherwise */ public function isQuoteMatch($quoteMatch) { @@ -257,7 +257,7 @@ class FullTransformer * * @param DateTime $dateTime The DateTime object to be used to calculate the timestamp * @param array $options An array with the matched values to be used to calculate the timestamp - * @return bool|int The calculated timestamp or false if matched date is invalid + * @return Boolean|int The calculated timestamp or false if matched date is invalid */ protected function calculateUnixTimestamp(\DateTime $dateTime, array $options) { diff --git a/src/Symfony/Component/Locale/Stub/StubCollator.php b/src/Symfony/Component/Locale/Stub/StubCollator.php index b59a7a6899..2b973dbdce 100644 --- a/src/Symfony/Component/Locale/Stub/StubCollator.php +++ b/src/Symfony/Component/Locale/Stub/StubCollator.php @@ -98,7 +98,7 @@ class StubCollator * StubCollator::SORT_REGULAR - compare items normally (don't change types) * StubCollator::SORT_NUMERIC - compare items numerically * StubCollator::SORT_STRING - compare items as strings - * @return bool True on success or false on failure + * @return Boolean True on success or false on failure */ public function asort(&$array, $sortFlag = self::SORT_REGULAR) { @@ -118,7 +118,7 @@ class StubCollator * * @param string $str1 The first string to compare * @param string $str2 The second string to compare - * @return bool|int Return the comparison result or false on failure: + * @return Boolean|int Return the comparison result or false on failure: * 1 if $str1 is greater than $str2 * 0 if $str1 is equal than $str2 * -1 if $str1 is less than $str2 @@ -134,7 +134,7 @@ class StubCollator * Get a value of an integer collator attribute * * @param int $attr An attribute specifier, one of the attribute constants - * @return bool|int The attribute value on success or false on error + * @return Boolean|int The attribute value on success or false on error * @see http://www.php.net/manual/en/collator.getattribute.php * @throws MethodNotImplementedException */ @@ -190,7 +190,7 @@ class StubCollator /** * Get current collator's strenght * - * @return bool|int The current collator's strenght or false on failure + * @return Boolean|int The current collator's strenght or false on failure * @see http://www.php.net/manual/en/collator.getstrength.php * @throws MethodNotImplementedException */ @@ -204,7 +204,7 @@ class StubCollator * * @param int $attr An attribute specifier, one of the attribute constants * @param int $val The attribute value, one of the attribute value constants - * @return bool True on success or false on failure + * @return Boolean True on success or false on failure * @see http://www.php.net/manual/en/collator.setattribute.php * @throws MethodNotImplementedException */ @@ -223,7 +223,7 @@ class StubCollator * StubCollator::QUATERNARY * StubCollator::IDENTICAL * StubCollator::DEFAULT - * @return bool True on success or false on failure + * @return Boolean True on success or false on failure * @see http://www.php.net/manual/en/collator.setstrength.php * @throws MethodNotImplementedException */ @@ -236,7 +236,7 @@ class StubCollator * Sort array using specified collator and sort keys * * @param array &$arr Array of strings to sort - * @return bool True on success or false on failure + * @return Boolean True on success or false on failure * @see http://www.php.net/manual/en/collator.sortwithsortkeys.php * @throws MethodNotImplementedException */ @@ -253,7 +253,7 @@ class StubCollator * StubCollator::SORT_REGULAR * StubCollator::SORT_NUMERIC * StubCollator::SORT_STRING - * @return bool True on success or false on failure + * @return Boolean True on success or false on failure * @see http://www.php.net/manual/en/collator.sort.php * @throws MethodNotImplementedException */ diff --git a/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php b/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php index 01582b23b3..d86aa0ac6a 100644 --- a/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php +++ b/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php @@ -90,7 +90,7 @@ class StubIntlDateFormatter private $dateTimeZone; /** - * @var bool + * @var Boolean */ private $unitializedTimeZoneId = false; @@ -320,7 +320,7 @@ class StubIntlDateFormatter * Set the formatter's calendar * * @param string $calendar The calendar to use. Default is IntlDateFormatter::GREGORIAN. - * @return bool true on success or false on failure + * @return Boolean true on success or false on failure * @see http://www.php.net/manual/en/intldateformatter.setcalendar.php * @throws MethodNotImplementedException */ @@ -337,8 +337,8 @@ class StubIntlDateFormatter * patterns, parsing as much as possible to obtain a value. Extra space, unrecognized tokens, or * invalid values ("February 30th") are not accepted. * - * @param bool $lenient Sets whether the parser is lenient or not, default is false (strict) - * @return bool true on success or false on failure + * @param Boolean $lenient Sets whether the parser is lenient or not, default is false (strict) + * @return Boolean true on success or false on failure * @see http://www.php.net/manual/en/intldateformatter.setlenient.php * @throws MethodNotImplementedException */ @@ -351,7 +351,7 @@ class StubIntlDateFormatter * Set the formatter's pattern * * @param string $pattern A pattern string in conformance with the ICU IntlDateFormatter documentation - * @return bool true on success or false on failure + * @return Boolean true on success or false on failure * @see http://www.php.net/manual/en/intldateformatter.setpattern.php * @see http://userguide.icu-project.org/formatparse/datetime */ @@ -370,7 +370,7 @@ class StubIntlDateFormatter * @param string $timeZoneId The time zone ID string of the time zone to use. * If NULL or the empty string, the default time zone for the * runtime is used. - * @return bool true on success or false on failure + * @return Boolean true on success or false on failure * @see http://www.php.net/manual/en/intldateformatter.settimezoneid.php */ public function setTimeZoneId($timeZoneId) diff --git a/src/Symfony/Component/Locale/Stub/StubLocale.php b/src/Symfony/Component/Locale/Stub/StubLocale.php index c8bef57bfd..ceeb15c5b2 100644 --- a/src/Symfony/Component/Locale/Stub/StubLocale.php +++ b/src/Symfony/Component/Locale/Stub/StubLocale.php @@ -369,7 +369,7 @@ class StubLocale * * @param array $langtag A list of the language tags to compare to locale * @param string $locale The locale to use as the language range when matching - * @param bool $canonicalize If true, the arguments will be converted to canonical form before matching + * @param Boolean $canonicalize If true, the arguments will be converted to canonical form before matching * @param string $default The locale to use if no match is found * @see http://www.php.net/manual/en/locale.lookup.php * @throws RuntimeException When the intl extension is not loaded @@ -396,7 +396,7 @@ class StubLocale * Sets the default runtime locale * * @param string $locale The locale code - * @return bool true on success or false on failure + * @return Boolean true on success or false on failure * @see http://www.php.net/manual/en/locale.parselocale.php * @throws MethodNotImplementedException */ diff --git a/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php b/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php index 6ef99f3d0e..4f4832c01f 100644 --- a/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php +++ b/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php @@ -292,7 +292,7 @@ class StubNumberFormatter * * @param number $value The value to format * @param int $type Type of the formatting, one of the format type constants - * @return bool|string The formatted value or false on error + * @return Boolean|string The formatted value or false on error * @see http://www.php.net/manual/en/numberformatter.format.php * @throws RuntimeException If the method is called with the class $style 'CURRENCY' * @throws MethodArgumentNotImplementedException If the $type is different than TYPE_DEFAULT @@ -327,7 +327,7 @@ class StubNumberFormatter * Returns an attribute value * * @param int $attr An attribute specifier, one of the numeric attribute constants - * @return bool|int The attribute value on success or false on error + * @return Boolean|int The attribute value on success or false on error * @see http://www.php.net/manual/en/numberformatter.getattribute.php */ public function getAttribute($attr) @@ -372,7 +372,7 @@ class StubNumberFormatter /** * Returns the formatter's pattern * - * @return bool|string The pattern string used by the formatter or false on error + * @return Boolean|string The pattern string used by the formatter or false on error * @see http://www.php.net/manual/en/numberformatter.getpattern.php * @throws MethodNotImplementedException */ @@ -385,7 +385,7 @@ class StubNumberFormatter * Returns a formatter symbol value * * @param int $attr A symbol specifier, one of the format symbol constants - * @return bool|string The symbol value or false on error + * @return Boolean|string The symbol value or false on error * @see http://www.php.net/manual/en/numberformatter.getsymbol.php * @throws MethodNotImplementedException */ @@ -398,7 +398,7 @@ class StubNumberFormatter * Returns a formatter text attribute value * * @param int $attr An attribute specifier, one of the text attribute constants - * @return bool|string The attribute value or false on error + * @return Boolean|string The attribute value or false on error * @see http://www.php.net/manual/en/numberformatter.gettextattribute.php * @throws MethodNotImplementedException */ @@ -413,7 +413,7 @@ class StubNumberFormatter * @param string $value The value to parse * @param string $currency Parameter to receive the currency name (reference) * @param int $position Offset to begin the parsing on return this value will hold the offset at which the parsing ended - * @return bool|string The parsed numeric value of false on error + * @return Boolean|string The parsed numeric value of false on error * @see http://www.php.net/manual/en/numberformatter.parsecurrency.php * @throws MethodNotImplementedException */ @@ -428,7 +428,7 @@ class StubNumberFormatter * @param string $value The value to parse * @param string $type Type of the formatting, one of the format type constants. NumberFormatter::TYPE_DOUBLE by default * @param int $position Offset to begin the parsing on return this value will hold the offset at which the parsing ended - * @return bool|string The parsed value of false on error + * @return Boolean|string The parsed value of false on error * @see http://www.php.net/manual/en/numberformatter.parse.php * @throws MethodArgumentValueNotImplementedException When $type equals to TYPE_INT64, behavior not implemented * @throws MethodArgumentNotImplementedException When $position different than null, behavior not implemented @@ -468,7 +468,7 @@ class StubNumberFormatter * * @param int $attr An attribute specifier, one of the numeric attribute constants * @param int $value The attribute value - * @return bool true on success or false on failure + * @return Boolean true on success or false on failure * @see http://www.php.net/manual/en/numberformatter.setattribute.php * @throws MethodArgumentValueNotImplementedException When the $attr is not supported * @throws MethodArgumentValueNotImplementedException When the $value is not supported @@ -510,7 +510,7 @@ class StubNumberFormatter * Set the formatter's pattern * * @param string $pattern A pattern string in conformance with the ICU DecimalFormat documentation - * @return bool true on success or false on failure + * @return Boolean true on success or false on failure * @see http://www.php.net/manual/en/numberformatter.setpattern.php * @see http://www.icu-project.org/apiref/icu4c/classDecimalFormat.html#_details * @throws MethodNotImplementedException @@ -525,7 +525,7 @@ class StubNumberFormatter * * @param int $attr A symbol specifier, one of the format symbol constants * @param string $value The value for the symbol - * @return bool true on success or false on failure + * @return Boolean true on success or false on failure * @see http://www.php.net/manual/en/numberformatter.setsymbol.php * @throws MethodNotImplementedException */ @@ -539,7 +539,7 @@ class StubNumberFormatter * * @param int $attr An attribute specifier, one of the text attribute constants * @param int $value The attribute value - * @return bool true on success or false on failure + * @return Boolean true on success or false on failure * @see http://www.php.net/manual/en/numberformatter.settextattribute.php * @throws MethodNotImplementedException */ @@ -674,7 +674,7 @@ class StubNumberFormatter * Check if the attribute is initialized (value set by client code). * * @param string $attr The attribute name - * @return bool true if the value was set by cliente, false otherwise + * @return Boolean true if the value was set by cliente, false otherwise */ private function isInitializedAttribute($attr) { @@ -719,7 +719,7 @@ class StubNumberFormatter * Check if the rounding mode is invalid. * * @param int $value The rounding mode value to check - * @return bool true if the rounding mode is invalid, false otherwise + * @return Boolean true if the rounding mode is invalid, false otherwise */ private function isInvalidRoundingMode($value) { @@ -738,7 +738,7 @@ class StubNumberFormatter * @return int The normalized value for the attribute (0 or 1) */ private function normalizeGroupingUsedValue($value) { - return (int) (bool) (int) $value; + return (int) (Boolean) (int) $value; } /** diff --git a/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php b/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php index 0a0ea5d84b..e6f5ff9b0e 100644 --- a/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php @@ -201,7 +201,7 @@ class XmlEncoder extends AbstractEncoder implements DecoderInterface * * @param DOMNode $parentNode * @param array|object $data data - * @return bool + * @return Boolean */ private function buildXml($parentNode, $data) { diff --git a/tests/Symfony/Tests/Component/HttpKernel/KernelTest.php b/tests/Symfony/Tests/Component/HttpKernel/KernelTest.php index 7de5362cd0..c2e07c1cde 100644 --- a/tests/Symfony/Tests/Component/HttpKernel/KernelTest.php +++ b/tests/Symfony/Tests/Component/HttpKernel/KernelTest.php @@ -737,7 +737,7 @@ class KernelForTest extends Kernel public function setIsBooted($value) { - $this->booted = (bool) $value; + $this->booted = (Boolean) $value; } }