Skip to content

Commit

Permalink
added property typehints
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Feb 12, 2024
1 parent 13df325 commit 5433573
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/CommandLine/Console.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
*/
class Console
{
/** @var bool */
private $useColors;
private bool $useColors;


public function __construct()
Expand Down
9 changes: 4 additions & 5 deletions src/CommandLine/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,15 @@ class Parser


/** @var array[] */
private $options = [];
private array $options = [];

/** @var string[] */
private $aliases = [];
private array $aliases = [];

/** @var string[] */
private $positional = [];
private array $positional = [];

/** @var string */
private $help;
private string $help;


public function __construct(string $help, array $defaults = [])
Expand Down
1 change: 0 additions & 1 deletion tests/Parser.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ test('positional arguments', function () {
$cmd = new Parser('', [
'pos' => [Parser::Default => 'default', Parser::Repeatable => true],
]);

Assert::same(['pos' => ['default']], $cmd->parse([]));
});

Expand Down

0 comments on commit 5433573

Please sign in to comment.