Skip to content

Commit

Permalink
Add type string to docblock for Process::setInput()
Browse files Browse the repository at this point in the history
  • Loading branch information
icanhazstring authored and nicolas-grekas committed Jan 7, 2018
1 parent 840a3d8 commit e3de68f
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 17 deletions.
6 changes: 5 additions & 1 deletion src/Symfony/Component/Process/InputStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@
*/
class InputStream implements \IteratorAggregate
{
/** @var null|callable */
private $onEmpty = null;
private $input = array();
private $open = true;

/**
* Sets a callback that is called when the write buffer becomes empty.
*
* @param null|callable $onEmpty
*/
public function onEmpty(callable $onEmpty = null)
{
Expand All @@ -35,7 +38,8 @@ public function onEmpty(callable $onEmpty = null)
/**
* 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)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Process/Pipes/AbstractPipes.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ abstract class AbstractPipes implements PipesInterface
private $blocked = true;

/**
* @param resource|scalar|\Iterator|null $input
* @param resource|int|string|bool|float|\Iterator|null $input
*/
public function __construct($input)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Process/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@ public function getInput()
*
* 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
*
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Process/ProcessBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public function addEnvironmentVariables(array $variables)
/**
* 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
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ interface EncoderInterface
* @param string $format Format name
* @param array $context Options that normalizers/encoders have access to
*
* @return scalar
* @return int|string|bool|float
*
* @throws UnexpectedValueException
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ interface DenormalizableInterface
* It is important to understand that the denormalize() call should denormalize
* recursively all child objects of the implementor.
*
* @param DenormalizerInterface $denormalizer The denormalizer is given so that you
* can use it to denormalize objects contained within this object
* @param array|scalar $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
* based on different input formats
* @param array $context Options for denormalizing
* @param DenormalizerInterface $denormalizer The denormalizer is given so that you
* can use it to denormalize objects contained within this 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 based on different input formats
* @param array $context Options for denormalizing
*
* @return object
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ interface NormalizableInterface
* based on different output formats
* @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());
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ interface NormalizerInterface
* @param string $format Format the normalization result will be encoded as
* @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 CircularReferenceException Occurs when the normalizer detects a circular reference when no circular
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/VarDumper/Cloner/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function getType()
/**
* @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)
{
Expand Down
6 changes: 3 additions & 3 deletions src/Symfony/Component/VarDumper/Cloner/DumperInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ interface DumperInterface
/**
* Dumps a scalar value.
*
* @param Cursor $cursor The Cursor position in the dump
* @param string $type The PHP type of the value being dumped
* @param scalar $value The scalar value being dumped
* @param Cursor $cursor The Cursor position in the dump
* @param string $type The PHP type of the value being dumped
* @param int|string|bool|float $value The scalar value being dumped
*/
public function dumpScalar(Cursor $cursor, $type, $value);

Expand Down

0 comments on commit e3de68f

Please sign in to comment.