Skip to content

Commit

Permalink
Fix failing PHPStan issue (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
peter279k authored and dragonmantank committed Jan 5, 2022
1 parent 6a9fccc commit 7a364e7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,17 @@ jobs:
- name: "Checkout"
uses: actions/checkout@v2

- name: PHPStan
uses: docker://oskarstark/phpstan-ga
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
args: analyse --level=max src
php-version: ${{ matrix.php }}
extensions: json, mbstring

- name: Install dependencies
run: composer update --prefer-dist --no-interaction

- name: Start Static Analyze
run: composer phpstan -n

phpunit:
name: PHPUnit - PHP ${{ matrix.php }}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"mtdowling/cron-expression": "^1.0"
},
"scripts": {
"phpstan": "./vendor/bin/phpstan analyse -l max src",
"phpstan": "./vendor/bin/phpstan analyse -l max src tests",
"test": "phpunit"
}
}
2 changes: 1 addition & 1 deletion tests/Cron/CronExpressionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ public function testNextRunDateShouldNotAddMinutes(): void
/**
* Tests the getParts function.
*/
public function testGetParts()
public function testGetParts(): void
{
$e = CronExpression::factory('0 22 * * 1-5');
$parts = $e->getParts();
Expand Down

0 comments on commit 7a364e7

Please sign in to comment.