Skip to content

Commit 32dd186

Browse files
committed
Add phpstan
1 parent 431923e commit 32dd186

File tree

3 files changed

+71
-7
lines changed

3 files changed

+71
-7
lines changed

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"require-dev": {
1919
"phpunit/phpunit": "^9.5",
2020
"nyholm/psr7": "^1.3",
21-
"phan/phan": "^5.4"
21+
"phan/phan": "^5.4",
22+
"phpstan/phpstan": "^1.10"
2223
},
2324
"autoload": {
2425
"psr-4": {
@@ -32,6 +33,7 @@
3233
},
3334
"scripts": {
3435
"phan": "phan --progress-bar -o analysis.txt",
36+
"phpstan": "vendor/bin/phpstan analyse -l 9 src tests",
3537
"test": "vendor/bin/phpunit"
3638
}
3739
}

composer.lock

Lines changed: 63 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Command.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ final class Command
6666
private $template;
6767

6868
/**
69-
* @var array command line options
69+
* @var array<mixed> command line options
7070
*/
7171
private $options = [];
7272

@@ -138,7 +138,7 @@ public function getTemplate(): string
138138
}
139139

140140
/**
141-
* @param array $options
141+
* @param array<mixed> $options
142142
* @return Command
143143
*/
144144
public function setOptions(array $options): Command
@@ -148,7 +148,7 @@ public function setOptions(array $options): Command
148148
}
149149

150150
/**
151-
* @return array
151+
* @return array<mixed>
152152
*/
153153
public function getOptions(): array
154154
{
@@ -167,7 +167,7 @@ public function addOption(string $option, $argument = null): Command
167167
}
168168

169169
/**
170-
* @param array $options
170+
* @param array<mixed> $options
171171
*/
172172
public function addOptions(array $options): void
173173
{
@@ -331,7 +331,7 @@ private function escape(string $argument): string
331331

332332
/**
333333
* Converts option from user-friendly format ot internal format
334-
* @param array $options
334+
* @param array<mixed> $options
335335
* @return array
336336
*/
337337
private function toInternalFormat(array $options): array

0 commit comments

Comments
 (0)