Skip to content

Commit 3bb219e

Browse files
committed
PHPStan: fixed errors
1 parent 28a6f98 commit 3bb219e

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

phpstan.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
parameters:
22
level: max
3+
treatPhpDocTypesAsCertain: false
34

45
paths:
56
- src

src/Application/Application.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Application
1717
protected $console;
1818

1919
/** @var array<string, ICommand> */
20-
protected $commands;
20+
protected $commands = [];
2121

2222
/** @var string|NULL */
2323
protected $applicationName;
@@ -29,7 +29,7 @@ class Application
2929
/**
3030
* @param string|NULL $applicationName
3131
* @param string|NULL $defaultCommand
32-
* @param ICommand[] $commands
32+
* @param array<string, ICommand> $commands
3333
*/
3434
public function __construct(
3535
?Console $console = NULL,

src/Application/CommandParameters.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class CommandParameters
1212
/** @var array<string, string|CommandOption> */
1313
private $options = [];
1414

15-
/** @var array<CommandArgument> */
15+
/** @var array<int, CommandArgument> */
1616
private $arguments = [];
1717

1818

@@ -87,7 +87,7 @@ public function addArgument($name, $type = Types::STRING)
8787

8888

8989
/**
90-
* @return CommandArgument[]
90+
* @return array<int, CommandArgument>
9191
*/
9292
public function getArguments()
9393
{

src/Parameters/ParametersFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class ParametersFactory
1212
/** @var array<string, mixed> */
1313
private $options = [];
1414

15-
/** @var mixed[] */
15+
/** @var array<int, mixed> */
1616
private $arguments = [];
1717

1818

0 commit comments

Comments
 (0)