Skip to content

Commit cfa88ba

Browse files
Add types to private and internal properties
1 parent 886ac3d commit cfa88ba

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

Command/CompleteCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ final class CompleteCommand extends Command
4444
*/
4545
protected static $defaultDescription = 'Internal command to provide shell completion suggestions';
4646

47-
private $completionOutputs;
47+
private array $completionOutputs;
4848

49-
private $isDebug = false;
49+
private bool $isDebug = false;
5050

5151
/**
5252
* @param array<string, class-string<CompletionOutputInterface>> $completionOutputs A list of additional completion outputs, with shell name as key and FQCN as value

Completion/CompletionInput.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ final class CompletionInput extends ArgvInput
3131
public const TYPE_OPTION_NAME = 'option_name';
3232
public const TYPE_NONE = 'none';
3333

34-
private $tokens;
35-
private $currentIndex;
36-
private $completionType;
37-
private $completionName;
38-
private $completionValue = '';
34+
private array $tokens;
35+
private int $currentIndex;
36+
private string $completionType;
37+
private ?string $completionName = null;
38+
private string $completionValue = '';
3939

4040
/**
4141
* Converts a terminal string into tokens.

Completion/CompletionSuggestions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
*/
2121
final class CompletionSuggestions
2222
{
23-
private $valueSuggestions = [];
24-
private $optionSuggestions = [];
23+
private array $valueSuggestions = [];
24+
private array $optionSuggestions = [];
2525

2626
/**
2727
* Add a suggested value for an input option or argument.

Tester/CommandCompletionTester.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323
class CommandCompletionTester
2424
{
25-
private $command;
25+
private Command $command;
2626

2727
public function __construct(Command $command)
2828
{

0 commit comments

Comments
 (0)