made types consistent with those defined in Hack

This commit is contained in:
Fabien Potencier 2014-04-16 10:09:01 +02:00
parent df3d543349
commit 24dde55feb
25 changed files with 51 additions and 51 deletions

View File

@ -110,7 +110,7 @@ EOF
/** /**
* @param string $warmupDir * @param string $warmupDir
* @param string $realCacheDir * @param string $realCacheDir
* @param Boolean $enableOptionalWarmers * @param bool $enableOptionalWarmers
*/ */
protected function warmup($warmupDir, $realCacheDir, $enableOptionalWarmers = true) protected function warmup($warmupDir, $realCacheDir, $enableOptionalWarmers = true)
{ {

View File

@ -50,8 +50,8 @@ class AssetsExtension extends \Twig_Extension
* *
* @param string $path A public path * @param string $path A public path
* @param string $packageName The name of the asset package to use * @param string $packageName The name of the asset package to use
* @param Boolean $absolute Whether to return an absolute URL or a relative one * @param bool $absolute Whether to return an absolute URL or a relative one
* @param string|Boolean|null $version A specific version * @param string|bool|null $version A specific version
* *
* @return string A public path which takes into account the base path and URL path * @return string A public path which takes into account the base path and URL path
*/ */

View File

@ -77,7 +77,7 @@ class Psr4ClassLoader
/** /**
* Registers this instance as an autoloader. * Registers this instance as an autoloader.
* *
* @param Boolean $prepend * @param bool $prepend
*/ */
public function register($prepend = false) public function register($prepend = false)
{ {

View File

@ -51,7 +51,7 @@ class ProgressBar
* Constructor. * Constructor.
* *
* @param OutputInterface $output An OutputInterface instance * @param OutputInterface $output An OutputInterface instance
* @param integer $max Maximum steps (0 if unknown) * @param int $max Maximum steps (0 if unknown)
*/ */
public function __construct(OutputInterface $output, $max = 0) public function __construct(OutputInterface $output, $max = 0)
{ {
@ -200,7 +200,7 @@ class ProgressBar
/** /**
* Sets the progress bar width. * Sets the progress bar width.
* *
* @param integer $size The progress bar size * @param int $size The progress bar size
*/ */
public function setBarWidth($size) public function setBarWidth($size)
{ {
@ -299,7 +299,7 @@ class ProgressBar
/** /**
* Sets the redraw frequency. * Sets the redraw frequency.
* *
* @param integer $freq The frequency in steps * @param int $freq The frequency in steps
*/ */
public function setRedrawFrequency($freq) public function setRedrawFrequency($freq)
{ {
@ -328,7 +328,7 @@ class ProgressBar
/** /**
* Advances the progress output X steps. * Advances the progress output X steps.
* *
* @param integer $step Number of steps to advance * @param int $step Number of steps to advance
* *
* @throws \LogicException * @throws \LogicException
*/ */
@ -340,7 +340,7 @@ class ProgressBar
/** /**
* Sets the current progress. * Sets the current progress.
* *
* @param integer $step The current progress * @param int $step The current progress
* *
* @throws \LogicException * @throws \LogicException
*/ */

View File

@ -295,7 +295,7 @@ class Table
* Renders table cell with padding. * Renders table cell with padding.
* *
* @param array $row * @param array $row
* @param integer $column * @param int $column
* @param string $cellFormat * @param string $cellFormat
*/ */
private function renderCell(array $row, $column, $cellFormat) private function renderCell(array $row, $column, $cellFormat)
@ -337,7 +337,7 @@ class Table
/** /**
* Gets column width. * Gets column width.
* *
* @param integer $column * @param int $column
* *
* @return integer * @return integer
*/ */
@ -363,7 +363,7 @@ class Table
* Gets cell width. * Gets cell width.
* *
* @param array $row * @param array $row
* @param integer $column * @param int $column
* *
* @return integer * @return integer
*/ */

View File

@ -228,7 +228,7 @@ class TableStyle
/** /**
* Sets cell padding type. * Sets cell padding type.
* *
* @param integer $padType STR_PAD_* * @param int $padType STR_PAD_*
* *
* @return TableStyle * @return TableStyle
*/ */
@ -242,7 +242,7 @@ class TableStyle
/** /**
* Gets cell padding type. * Gets cell padding type.
* *
* @param integer * @param int
*/ */
public function getPadType() public function getPadType()
{ {

View File

@ -47,7 +47,7 @@ class ChoiceQuestion extends Question
* *
* When multiselect is set to true, multiple choices can be answered. * When multiselect is set to true, multiple choices can be answered.
* *
* @param Boolean $multiselect * @param bool $multiselect
* *
* @return ChoiceQuestion The current instance * @return ChoiceQuestion The current instance
*/ */

View File

@ -20,7 +20,7 @@ class ConfirmationQuestion extends Question
{ {
public function __construct($question, $default = true) public function __construct($question, $default = true)
{ {
parent::__construct($question, (Boolean) $default); parent::__construct($question, (bool) $default);
$this->setNormalizer($this->getDefaultNormalizer()); $this->setNormalizer($this->getDefaultNormalizer());
} }

View File

@ -73,7 +73,7 @@ class Question
/** /**
* Sets whether the user response must be hidden or not. * Sets whether the user response must be hidden or not.
* *
* @param Boolean $hidden * @param bool $hidden
* *
* @return Question The current instance * @return Question The current instance
* *
@ -85,7 +85,7 @@ class Question
throw new \LogicException('A hidden question cannot use the autocompleter.'); throw new \LogicException('A hidden question cannot use the autocompleter.');
} }
$this->hidden = (Boolean) $hidden; $this->hidden = (bool) $hidden;
return $this; return $this;
} }
@ -103,13 +103,13 @@ class Question
/** /**
* Sets whether to fallback on non-hidden question if the response can not be hidden. * Sets whether to fallback on non-hidden question if the response can not be hidden.
* *
* @param Boolean $fallback * @param bool $fallback
* *
* @return Question The current instance * @return Question The current instance
*/ */
public function setHiddenFallback($fallback) public function setHiddenFallback($fallback)
{ {
$this->hiddenFallback = (Boolean) $fallback; $this->hiddenFallback = (bool) $fallback;
return $this; return $this;
} }
@ -180,7 +180,7 @@ class Question
* *
* Null means an unlimited number of attempts. * Null means an unlimited number of attempts.
* *
* @param null|integer $attempts * @param null|int $attempts
* *
* @return Question The current instance * @return Question The current instance
* *

View File

@ -299,7 +299,7 @@ class XmlFileLoader extends FileLoader
* *
* @param \DOMElement $node * @param \DOMElement $node
* @param string $name * @param string $name
* @param Boolean $lowercase * @param bool $lowercase
* *
* @return mixed * @return mixed
*/ */

View File

@ -1131,7 +1131,7 @@ class Form implements \IteratorAggregate, FormInterface
* Utility function for indenting multi-line strings. * Utility function for indenting multi-line strings.
* *
* @param string $string The string * @param string $string The string
* @param integer $level The number of spaces to use for indentation * @param int $level The number of spaces to use for indentation
* *
* @return string The indented string * @return string The indented string
*/ */

View File

@ -159,7 +159,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
/** /**
* Returns whether a position exists in the iterator. * Returns whether a position exists in the iterator.
* *
* @param integer $position The position * @param int $position The position
* *
* @return Boolean Whether that position exists * @return Boolean Whether that position exists
*/ */
@ -171,7 +171,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
/** /**
* Returns the element at a position in the iterator. * Returns the element at a position in the iterator.
* *
* @param integer $position The position * @param int $position The position
* *
* @return FormError|FormErrorIterator The element at the given position * @return FormError|FormErrorIterator The element at the given position
* *
@ -250,7 +250,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array
/** /**
* Sets the position of the iterator. * Sets the position of the iterator.
* *
* @param integer $position The new position * @param int $position The new position
* *
* @throws OutOfBoundsException If the position is invalid * @throws OutOfBoundsException If the position is invalid
*/ */

View File

@ -94,8 +94,8 @@ interface FormInterface extends \ArrayAccess, \Traversable, \Countable
/** /**
* Returns the errors of this form. * Returns the errors of this form.
* *
* @param Boolean $deep Whether to include errors of child forms as well * @param bool $deep Whether to include errors of child forms as well
* @param Boolean $flatten Whether to flatten the list of errors in case * @param bool $flatten Whether to flatten the list of errors in case
* $deep is set to true * $deep is set to true
* *
* @return FormErrorIterator An iterator over the {@link FormError} * @return FormErrorIterator An iterator over the {@link FormError}

View File

@ -117,13 +117,13 @@ class JsonResponse extends Response
/** /**
* Sets options used while encoding data to JSON. * Sets options used while encoding data to JSON.
* *
* @param integer $encodingOptions * @param int $encodingOptions
* *
* @return JsonResponse * @return JsonResponse
*/ */
public function setEncodingOptions($encodingOptions) public function setEncodingOptions($encodingOptions)
{ {
$this->encodingOptions = (integer) $encodingOptions; $this->encodingOptions = (int) $encodingOptions;
return $this->setData(json_decode($this->data)); return $this->setData(json_decode($this->data));
} }

View File

@ -20,8 +20,8 @@ class ValueExporter
* Converts a PHP value to a string. * Converts a PHP value to a string.
* *
* @param mixed $value The PHP value * @param mixed $value The PHP value
* @param integer $depth only for internal usage * @param int $depth only for internal usage
* @param Boolean $deep only for internal usage * @param bool $deep only for internal usage
* *
* @return string The string representation of the given value * @return string The string representation of the given value
*/ */

View File

@ -23,7 +23,7 @@ class UnprocessableEntityHttpException extends HttpException
* *
* @param string $message The internal exception message * @param string $message The internal exception message
* @param \Exception $previous The previous exception * @param \Exception $previous The previous exception
* @param integer $code The internal exception code * @param int $code The internal exception code
*/ */
public function __construct($message = null, \Exception $previous = null, $code = 0) public function __construct($message = null, \Exception $previous = null, $code = 0)
{ {

View File

@ -940,13 +940,13 @@ class Process
/** /**
* Sets PTY mode. * Sets PTY mode.
* *
* @param Boolean $bool * @param bool $bool
* *
* @return self * @return self
*/ */
public function setPty($bool) public function setPty($bool)
{ {
$this->pty = (Boolean) $bool; $this->pty = (bool) $bool;
return $this; return $this;
} }

View File

@ -107,7 +107,7 @@ class ProcessPipes
/** /**
* Returns an array of descriptors for the use of proc_open. * Returns an array of descriptors for the use of proc_open.
* *
* @param Boolean $disableOutput Whether to redirect STDOUT and STDERR to /dev/null or not. * @param bool $disableOutput Whether to redirect STDOUT and STDERR to /dev/null or not.
* *
* @return array * @return array
*/ */

View File

@ -57,7 +57,7 @@ class Package implements PackageInterface
* Applies version to the supplied path. * Applies version to the supplied path.
* *
* @param string $path A path * @param string $path A path
* @param string|Boolean|null $version A specific version * @param string|bool|null $version A specific version
* *
* @return string The versionized path * @return string The versionized path
*/ */

View File

@ -107,7 +107,7 @@ class CoreAssetsHelper extends Helper implements PackageInterface
* *
* @param string $path A public path * @param string $path A public path
* @param string $packageName The name of the asset package to use * @param string $packageName The name of the asset package to use
* @param string|Boolean|null $version A specific version * @param string|bool|null $version A specific version
* *
* @return string A public path which takes into account the base path and URL path * @return string A public path which takes into account the base path and URL path
*/ */

View File

@ -109,7 +109,7 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable
/** /**
* Returns whether the given offset exists in the sequence. * Returns whether the given offset exists in the sequence.
* *
* @param integer $offset The offset * @param int $offset The offset
* *
* @return Boolean Whether the offset exists * @return Boolean Whether the offset exists
* *
@ -124,7 +124,7 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable
/** /**
* Returns the group at the given offset. * Returns the group at the given offset.
* *
* @param integer $offset The offset * @param int $offset The offset
* *
* @return string The group a the given offset * @return string The group a the given offset
* *
@ -148,7 +148,7 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable
/** /**
* Sets the group at the given offset. * Sets the group at the given offset.
* *
* @param integer $offset The offset * @param int $offset The offset
* @param string $value The group name * @param string $value The group name
* *
* @deprecated Implemented for backwards compatibility with Symfony < 2.5. * @deprecated Implemented for backwards compatibility with Symfony < 2.5.
@ -168,7 +168,7 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable
/** /**
* Removes the group at the given offset. * Removes the group at the given offset.
* *
* @param integer $offset The offset * @param int $offset The offset
* *
* @deprecated Implemented for backwards compatibility with Symfony < 2.5. * @deprecated Implemented for backwards compatibility with Symfony < 2.5.
* To be removed in Symfony 3.0. * To be removed in Symfony 3.0.

View File

@ -190,7 +190,7 @@ abstract class MemberMetadata extends ElementMetadata implements PropertyMetadat
*/ */
public function isCascaded() public function isCascaded()
{ {
return (boolean) ($this->cascadingStrategy & CascadingStrategy::CASCADE); return (bool) ($this->cascadingStrategy & CascadingStrategy::CASCADE);
} }
/** /**
@ -204,7 +204,7 @@ abstract class MemberMetadata extends ElementMetadata implements PropertyMetadat
*/ */
public function isCollectionCascaded() public function isCollectionCascaded()
{ {
return (boolean) ($this->traversalStrategy & (TraversalStrategy::IMPLICIT | TraversalStrategy::TRAVERSE)); return (bool) ($this->traversalStrategy & (TraversalStrategy::IMPLICIT | TraversalStrategy::TRAVERSE));
} }
/** /**

View File

@ -264,7 +264,7 @@ class RecursiveContextualValidator implements ContextualValidatorInterface
* @param object $object The object to cascade * @param object $object The object to cascade
* @param string $propertyPath The current property path * @param string $propertyPath The current property path
* @param string[] $groups The validated groups * @param string[] $groups The validated groups
* @param integer $traversalStrategy The strategy for traversing the * @param int $traversalStrategy The strategy for traversing the
* cascaded object * cascaded object
* @param ExecutionContextInterface $context The current execution context * @param ExecutionContextInterface $context The current execution context
* *
@ -332,7 +332,7 @@ class RecursiveContextualValidator implements ContextualValidatorInterface
* @param array|\Traversable $collection The collection * @param array|\Traversable $collection The collection
* @param string $propertyPath The current property path * @param string $propertyPath The current property path
* @param string[] $groups The validated groups * @param string[] $groups The validated groups
* @param Boolean $stopRecursion Whether to disable * @param bool $stopRecursion Whether to disable
* recursive iteration. For * recursive iteration. For
* backwards compatibility * backwards compatibility
* with Symfony < 2.5. * with Symfony < 2.5.
@ -416,7 +416,7 @@ class RecursiveContextualValidator implements ContextualValidatorInterface
* @param string[]|null $cascadedGroups The groups in which * @param string[]|null $cascadedGroups The groups in which
* cascaded objects should * cascaded objects should
* be validated * be validated
* @param integer $traversalStrategy The strategy used for * @param int $traversalStrategy The strategy used for
* traversing the object * traversing the object
* @param ExecutionContextInterface $context The current execution context * @param ExecutionContextInterface $context The current execution context
* *
@ -608,7 +608,7 @@ class RecursiveContextualValidator implements ContextualValidatorInterface
* @param string[]|null $cascadedGroups The groups in which * @param string[]|null $cascadedGroups The groups in which
* cascaded objects should * cascaded objects should
* be validated * be validated
* @param integer $traversalStrategy The strategy used for * @param int $traversalStrategy The strategy used for
* traversing the value * traversing the value
* @param ExecutionContextInterface $context The current execution context * @param ExecutionContextInterface $context The current execution context
* *
@ -720,7 +720,7 @@ class RecursiveContextualValidator implements ContextualValidatorInterface
* value * value
* @param string $propertyPath The property path leading * @param string $propertyPath The property path leading
* to the value * to the value
* @param integer $traversalStrategy The strategy used for * @param int $traversalStrategy The strategy used for
* traversing the value * traversing the value
* @param GroupSequence $groupSequence The group sequence * @param GroupSequence $groupSequence The group sequence
* @param string[]|null $cascadedGroup The group that should * @param string[]|null $cascadedGroup The group that should

View File

@ -174,7 +174,7 @@ interface ValidatorBuilderInterface
/** /**
* Sets the API version that the returned validator should support. * Sets the API version that the returned validator should support.
* *
* @param integer $apiVersion The required API version * @param int $apiVersion The required API version
* *
* @return ValidatorBuilderInterface The builder object * @return ValidatorBuilderInterface The builder object
* *

View File

@ -82,7 +82,7 @@ interface ConstraintViolationBuilderInterface
* Sets the number which determines how the plural form of the violation * Sets the number which determines how the plural form of the violation
* message is chosen when it is translated. * message is chosen when it is translated.
* *
* @param integer $number The number for determining the plural form * @param int $number The number for determining the plural form
* *
* @return ConstraintViolationBuilderInterface This builder * @return ConstraintViolationBuilderInterface This builder
* *