Skip to content

Commit 6cd803d

Browse files
committed
Fix PHPStan
1 parent 7933fcc commit 6cd803d

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

phpstan-baseline.neon

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
parameters:
2+
ignoreErrors:
3+
-
4+
message: "#^Method DEVizzent\\\\CodeceptionMockServerHelper\\\\MockServerHelper::_beforeSuite\\(\\) has parameter \\$settings with no value type specified in iterable type array\\.$#"
5+
count: 1
6+
path: src/MockServerHelper.php

phpstan.neon.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ parameters:
22
level: 8
33

44
treatPhpDocTypesAsCertain: false
5+
reportMaybesInPropertyPhpDocTypes: false
56
reportUnmatchedIgnoredErrors: true
67

78
paths:
89
- src/
910

1011
excludePaths:
1112

12-
ignoreErrors:
13-
1413
includes:
14+
- phpstan-baseline.neon
1515
- vendor/phpstan/phpstan-strict-rules/rules.neon
1616
- vendor/phpstan/phpstan-deprecation-rules/rules.neon

src/MockServerHelper.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,31 @@
1010

1111
class MockServerHelper extends Module
1212
{
13+
14+
/**
15+
* @var array<string, string> $config
16+
*/
1317
protected array $config = [
1418
'url' => 'http://mockserver:1080',
1519
'cleanupBefore' => 'test'
1620
];
1721

1822
private Client $mockserverClient;
1923

20-
/**
21-
* @param array<string, string> $config
22-
*/
23-
public function _initialize()
24+
25+
public function _initialize(): void
2426
{
2527
$this->mockserverClient = new Client(['base_uri' => $this->config['url']]);
2628
}
2729

28-
public function _beforeSuite(array $settings = [])
30+
public function _beforeSuite(array $settings = []): void
2931
{
3032
if ('suite' === $this->config['cleanupBefore']) {
3133
$this->clearMockServerLogs();
3234
}
3335
}
3436

35-
public function _before(TestInterface $test)
37+
public function _before(TestInterface $test):void
3638
{
3739
if ('test' === $this->config['cleanupBefore']) {
3840
$this->clearMockServerLogs();

0 commit comments

Comments
 (0)