Skip to content

Commit c6b37ee

Browse files
committed
Fix build
1 parent ec52275 commit c6b37ee

2 files changed

Lines changed: 12 additions & 11 deletions

File tree

phpstan-baseline.neon

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,6 @@ parameters:
8080
count: 2
8181
path: src/File/FileExcluderFactory.php
8282

83-
-
84-
message: "#^Parameter \\#1 \\$array of function array_unique expects array, array\\<int, string\\>\\|string given\\.$#"
85-
count: 2
86-
path: src/File/FileExcluderFactory.php
87-
8883
-
8984
message: "#^Variable method call on PHPStan\\\\Reflection\\\\ClassReflection\\.$#"
9085
count: 2

src/File/FileExcluderFactory.php

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,15 @@ public function createAnalyseFileExcluder(): FileExcluder
3939
return $this->fileExcluderRawFactory->create($this->excludePaths);
4040
}
4141

42+
/** @var array{analyse?: array<int, string>, analyseAndScan?: array<int, string>} $excludePaths */
43+
$excludePaths = $this->excludePaths;
44+
4245
$paths = [];
43-
if (array_key_exists('analyse', $this->excludePaths)) {
44-
$paths = $this->excludePaths['analyse'];
46+
if (array_key_exists('analyse', $excludePaths)) {
47+
$paths = $excludePaths['analyse'];
4548
}
46-
if (array_key_exists('analyseAndScan', $this->excludePaths)) {
47-
$paths = array_merge($paths, $this->excludePaths['analyseAndScan']);
49+
if (array_key_exists('analyseAndScan', $excludePaths)) {
50+
$paths = array_merge($paths, $excludePaths['analyseAndScan']);
4851
}
4952

5053
return $this->fileExcluderRawFactory->create(array_values(array_unique($paths)));
@@ -60,9 +63,12 @@ public function createScanFileExcluder(): FileExcluder
6063
return $this->fileExcluderRawFactory->create($this->excludePaths);
6164
}
6265

66+
/** @var array{analyse?: array<int, string>, analyseAndScan?: array<int, string>} $excludePaths */
67+
$excludePaths = $this->excludePaths;
68+
6369
$paths = [];
64-
if (array_key_exists('analyseAndScan', $this->excludePaths)) {
65-
$paths = $this->excludePaths['analyseAndScan'];
70+
if (array_key_exists('analyseAndScan', $excludePaths)) {
71+
$paths = $excludePaths['analyseAndScan'];
6672
}
6773

6874
return $this->fileExcluderRawFactory->create(array_values(array_unique($paths)));

0 commit comments

Comments
 (0)