Skip to content

[Console] add missing type hints #33059

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions src/Symfony/Component/Console/Helper/DescriptorHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,9 @@ public function __construct()
* * format: string, the output format name
* * raw_text: boolean, sets output type as raw
*
* @param object $object
* @param array $options
*
* @throws InvalidArgumentException when the given format is not supported
*/
public function describe(OutputInterface $output, $object, array $options = [])
public function describe(OutputInterface $output, ?object $object, array $options = [])
{
$options = array_merge([
'raw_text' => false,
Expand All @@ -71,11 +68,9 @@ public function describe(OutputInterface $output, $object, array $options = [])
/**
* Registers a descriptor.
*
* @param string $format
*
* @return $this
*/
public function register($format, DescriptorInterface $descriptor)
public function register(string $format, DescriptorInterface $descriptor)
{
$this->descriptors[$format] = $descriptor;

Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Component/Console/Helper/ProgressIndicator.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ public function setMessage(?string $message)

/**
* Starts the indicator output.
*
* @param $message
*/
public function start(string $message)
{
Expand Down
10 changes: 1 addition & 9 deletions src/Symfony/Component/Console/Helper/TableStyle.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,9 @@ public function getCrossingChars(): array
/**
* Sets header cell format.
*
* @param string $cellHeaderFormat
*
* @return $this
*/
public function setCellHeaderFormat($cellHeaderFormat)
public function setCellHeaderFormat(string $cellHeaderFormat)
{
$this->cellHeaderFormat = $cellHeaderFormat;

Expand All @@ -251,8 +249,6 @@ public function getCellHeaderFormat()
/**
* Sets row cell format.
*
* @param string $cellRowFormat
*
* @return $this
*/
public function setCellRowFormat(string $cellRowFormat)
Expand All @@ -275,8 +271,6 @@ public function getCellRowFormat()
/**
* Sets row cell content format.
*
* @param string $cellRowContentFormat
*
* @return $this
*/
public function setCellRowContentFormat(string $cellRowContentFormat)
Expand All @@ -299,8 +293,6 @@ public function getCellRowContentFormat()
/**
* Sets table border format.
*
* @param string $borderFormat
*
* @return $this
*/
public function setBorderFormat(string $borderFormat)
Expand Down