Skip to content

Commit 7748a42

Browse files
committed
Added test
1 parent 5e3b792 commit 7748a42

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

tests/Helpers/FunctionHelperTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,14 @@ public static function dataParametersTypeHints(): array
174174
'$d' => new TypeHint('string|int|float', false, 0, 0),
175175
],
176176
],
177+
[
178+
'dnf',
179+
[
180+
'$a' => new TypeHint('(A&B)|C|D', false, 0, 0),
181+
'$b' => new TypeHint('A|(B&C)|D', false, 0, 0),
182+
'$c' => new TypeHint('A|B|(C&D)', false, 0, 0),
183+
],
184+
],
177185
];
178186
}
179187

tests/Helpers/data/functionParametersTypeHints.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php // lint >= 8.0
1+
<?php // lint >= 8.2
22

33
namespace FooNamespace;
44

@@ -22,4 +22,12 @@ abstract public function parametersWithWeirdDefinition(string$string,$int,bool$b
2222
public function unionTypeHints(string|int $a, int|false $b, null|int $c, string | int | float $d)
2323
{}
2424

25+
public function dnf(
26+
(A&B)|C|D $a,
27+
A|(B&C)|D $b,
28+
A|B|(C&D) $c,
29+
) {
30+
31+
}
32+
2533
}

0 commit comments

Comments
 (0)