Skip to content

Commit

Permalink
Add phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkart committed Jan 5, 2024
1 parent 431923e commit 32dd186
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 7 deletions.
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"require-dev": {
"phpunit/phpunit": "^9.5",
"nyholm/psr7": "^1.3",
"phan/phan": "^5.4"
"phan/phan": "^5.4",
"phpstan/phpstan": "^1.10"
},
"autoload": {
"psr-4": {
Expand All @@ -32,6 +33,7 @@
},
"scripts": {
"phan": "phan --progress-bar -o analysis.txt",
"phpstan": "vendor/bin/phpstan analyse -l 9 src tests",
"test": "vendor/bin/phpunit"
}
}
64 changes: 63 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions src/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ final class Command
private $template;

/**
* @var array command line options
* @var array<mixed> command line options
*/
private $options = [];

Expand Down Expand Up @@ -138,7 +138,7 @@ public function getTemplate(): string
}

/**
* @param array $options
* @param array<mixed> $options
* @return Command
*/
public function setOptions(array $options): Command
Expand All @@ -148,7 +148,7 @@ public function setOptions(array $options): Command
}

/**
* @return array
* @return array<mixed>
*/
public function getOptions(): array
{
Expand All @@ -167,7 +167,7 @@ public function addOption(string $option, $argument = null): Command
}

/**
* @param array $options
* @param array<mixed> $options
*/
public function addOptions(array $options): void
{
Expand Down Expand Up @@ -331,7 +331,7 @@ private function escape(string $argument): string

/**
* Converts option from user-friendly format ot internal format
* @param array $options
* @param array<mixed> $options
* @return array
*/
private function toInternalFormat(array $options): array
Expand Down

0 comments on commit 32dd186

Please sign in to comment.