minor #35387 [Console] Fix "Input" typehints (PatchRanger)

This PR was merged into the 5.0 branch.

Discussion
----------

[Console] Fix "Input" typehints

| Q             | A
| ------------- | ---
| Branch?       | 5.0
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #35385
| License       | MIT

Commits
-------

75dbaf0cc5 Fix #35385: Fix Console typehint
This commit is contained in:
Nicolas Grekas 2020-01-20 13:05:39 +01:00
commit 67fd73a312

View File

@ -104,7 +104,7 @@ abstract class Input implements InputInterface, StreamableInputInterface
/**
* {@inheritdoc}
*/
public function getArgument($name)
public function getArgument(string $name)
{
if (!$this->definition->hasArgument($name)) {
throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));
@ -116,7 +116,7 @@ abstract class Input implements InputInterface, StreamableInputInterface
/**
* {@inheritdoc}
*/
public function setArgument($name, $value)
public function setArgument(string $name, $value)
{
if (!$this->definition->hasArgument($name)) {
throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));