-
Notifications
You must be signed in to change notification settings - Fork 447
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix incorrect incomplete match error for `treatPhpDocTypesAsCertain: …
…false`
- Loading branch information
Richard van Velzen
committed
Jul 26, 2022
1 parent
1eec05f
commit 998671e
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
namespace Bug7622; | ||
|
||
final class AnalyticsKpiType | ||
{ | ||
public const SESSION_COUNT = 'session_count'; | ||
public const MISSION_COUNT = 'mission_count'; | ||
public const SESSION_GAP = 'session_gap'; | ||
} | ||
|
||
class HelloWorld | ||
{ | ||
|
||
/** | ||
* @param AnalyticsKpiType::* $currentKpi | ||
* @param int[] $filteredMemberIds | ||
*/ | ||
public function test(string $currentKpi, array $filteredMemberIds): int | ||
{ | ||
return match ($currentKpi) { | ||
AnalyticsKpiType::SESSION_COUNT => 12, | ||
AnalyticsKpiType::MISSION_COUNT => 5, | ||
AnalyticsKpiType::SESSION_GAP => 14, | ||
}; | ||
} | ||
} |