Sfoglia il codice sorgente

replaced 'bool' with 'Boolean'

Eriksen Costa 14 anni fa
parent
commit
4db0752894

+ 1 - 1
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');
     }
 }

+ 2 - 2
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
      */

+ 1 - 1
src/Symfony/Component/Console/Input/InputInterface.php

@@ -97,7 +97,7 @@ interface InputInterface
     /**
      * Is this input means interactive?
      *
-     * @return bool
+     * @return Boolean
      */
     function isInteractive();
 }

+ 1 - 1
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;
 

+ 1 - 1
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)

+ 1 - 1
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'));

+ 2 - 2
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)
     {

+ 8 - 8
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
      */

+ 6 - 6
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)

+ 2 - 2
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
      */

+ 14 - 14
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;
     }
 
     /**

+ 1 - 1
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)
     {

+ 1 - 1
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;
     }
 }