Skip to content

Commit

Permalink
Add phpstan to gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkart committed Feb 22, 2024
1 parent 32dd186 commit 10865f0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ jobs:
- name: phan analysis
run: cat analysis.txt
if: failure()

- name: PHPStan
run: vendor/bin/phpstan analyse -l 8 --error-format=github src tests
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"scripts": {
"phan": "phan --progress-bar -o analysis.txt",
"phpstan": "vendor/bin/phpstan analyse -l 9 src tests",
"phpstan": "vendor/bin/phpstan analyse -l 8 src tests",
"test": "vendor/bin/phpunit"
}
}
4 changes: 2 additions & 2 deletions src/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ private function buildTemplatePart(string $search, string $replace): void
{
if ($replace === '') {
// remove extra space
$this->setCommand(preg_replace($this->getTemplatePartPattern($search), $search, $this->getCommand()));
$this->setCommand((string)preg_replace($this->getTemplatePartPattern($search), $search, $this->getCommand()));
} else {
// add space
$replace = ' ' . $replace;
Expand Down Expand Up @@ -332,7 +332,7 @@ private function escape(string $argument): string
/**
* Converts option from user-friendly format ot internal format
* @param array<mixed> $options
* @return array
* @return array<mixed>
*/
private function toInternalFormat(array $options): array
{
Expand Down

0 comments on commit 10865f0

Please sign in to comment.