Add type string to docblock for Process::setInput()

This commit is contained in:
Andreas Frömer 2017-12-22 16:28:45 +01:00 committed by Nicolas Grekas
parent 840a3d8084
commit e3de68f2ff
10 changed files with 21 additions and 17 deletions

View File

@ -20,12 +20,15 @@ use Symfony\Component\Process\Exception\RuntimeException;
*/ */
class InputStream implements \IteratorAggregate class InputStream implements \IteratorAggregate
{ {
/** @var null|callable */
private $onEmpty = null; private $onEmpty = null;
private $input = array(); private $input = array();
private $open = true; private $open = true;
/** /**
* Sets a callback that is called when the write buffer becomes empty. * Sets a callback that is called when the write buffer becomes empty.
*
* @param null|callable $onEmpty
*/ */
public function onEmpty(callable $onEmpty = null) public function onEmpty(callable $onEmpty = null)
{ {
@ -35,7 +38,8 @@ class InputStream implements \IteratorAggregate
/** /**
* Appends an input to the write buffer. * Appends an input to the write buffer.
* *
* @param resource|scalar|\Traversable|null The input to append as stream resource, scalar or \Traversable * @param resource|int|string|bool|float|\Traversable|null The input to append as stream
* resource, scalar or \Traversable
*/ */
public function write($input) public function write($input)
{ {

View File

@ -27,7 +27,7 @@ abstract class AbstractPipes implements PipesInterface
private $blocked = true; private $blocked = true;
/** /**
* @param resource|scalar|\Iterator|null $input * @param resource|int|string|bool|float|\Iterator|null $input
*/ */
public function __construct($input) public function __construct($input)
{ {

View File

@ -1158,7 +1158,7 @@ class Process implements \IteratorAggregate
* *
* This content will be passed to the underlying process standard input. * This content will be passed to the underlying process standard input.
* *
* @param resource|scalar|\Traversable|null $input The content * @param int|float|string|bool|resource|\Traversable|null $input The content
* *
* @return self The current Process instance * @return self The current Process instance
* *

View File

@ -167,7 +167,7 @@ class ProcessBuilder
/** /**
* Sets the input of the process. * Sets the input of the process.
* *
* @param resource|scalar|\Traversable|null $input The input content * @param resource|int|string|bool|float|\Traversable|null $input The input content
* *
* @return $this * @return $this
* *

View File

@ -27,7 +27,7 @@ interface EncoderInterface
* @param string $format Format name * @param string $format Format name
* @param array $context Options that normalizers/encoders have access to * @param array $context Options that normalizers/encoders have access to
* *
* @return scalar * @return int|string|bool|float
* *
* @throws UnexpectedValueException * @throws UnexpectedValueException
*/ */

View File

@ -27,12 +27,12 @@ interface DenormalizableInterface
* It is important to understand that the denormalize() call should denormalize * It is important to understand that the denormalize() call should denormalize
* recursively all child objects of the implementor. * recursively all child objects of the implementor.
* *
* @param DenormalizerInterface $denormalizer The denormalizer is given so that you * @param DenormalizerInterface $denormalizer The denormalizer is given so that you
* can use it to denormalize objects contained within this object * can use it to denormalize objects contained within this object
* @param array|scalar $data The data from which to re-create the object * @param array|int|string|bool|float $data The data from which to re-create the object
* @param string|null $format The format is optionally given to be able to denormalize differently * @param string|null $format The format is optionally given to be able to denormalize
* based on different input formats * differently based on different input formats
* @param array $context Options for denormalizing * @param array $context Options for denormalizing
* *
* @return object * @return object
*/ */

View File

@ -33,7 +33,7 @@ interface NormalizableInterface
* based on different output formats * based on different output formats
* @param array $context Options for normalizing this object * @param array $context Options for normalizing this object
* *
* @return array|scalar * @return array|int|string|bool|float
*/ */
public function normalize(NormalizerInterface $normalizer, $format = null, array $context = array()); public function normalize(NormalizerInterface $normalizer, $format = null, array $context = array());
} }

View File

@ -29,7 +29,7 @@ interface NormalizerInterface
* @param string $format Format the normalization result will be encoded as * @param string $format Format the normalization result will be encoded as
* @param array $context Context options for the normalizer * @param array $context Context options for the normalizer
* *
* @return array|scalar * @return array|int|string|bool|float
* *
* @throws InvalidArgumentException Occurs when the object given is not an attempted type for the normalizer * @throws InvalidArgumentException Occurs when the object given is not an attempted type for the normalizer
* @throws CircularReferenceException Occurs when the normalizer detects a circular reference when no circular * @throws CircularReferenceException Occurs when the normalizer detects a circular reference when no circular

View File

@ -63,7 +63,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate
/** /**
* @param bool $recursive Whether values should be resolved recursively or not * @param bool $recursive Whether values should be resolved recursively or not
* *
* @return scalar|array|null|Data[] A native representation of the original value * @return int|string|bool|float|array|null|Data[] A native representation of the original value
*/ */
public function getValue($recursive = false) public function getValue($recursive = false)
{ {

View File

@ -21,9 +21,9 @@ interface DumperInterface
/** /**
* Dumps a scalar value. * Dumps a scalar value.
* *
* @param Cursor $cursor The Cursor position in the dump * @param Cursor $cursor The Cursor position in the dump
* @param string $type The PHP type of the value being dumped * @param string $type The PHP type of the value being dumped
* @param scalar $value The scalar value being dumped * @param int|string|bool|float $value The scalar value being dumped
*/ */
public function dumpScalar(Cursor $cursor, $type, $value); public function dumpScalar(Cursor $cursor, $type, $value);