Skip to content

Commit 898ce52

Browse files
fix: Support mixed typehint (#50)
1 parent d0d9ea9 commit 898ce52

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

ImportDetection/SniffHelpers.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public function isPredefinedTypehint(File $phpcsFile, $stackPtr) {
3333
$allTypehints = [
3434
'bool',
3535
'string',
36+
'mixed',
3637
'object',
3738
'int',
3839
'float',

tests/Sniffs/Imports/Fixtures/RequireImportsFixture.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,7 @@ function startMonitor() {
107107
function engageMagic(object $foobar) {
108108
echo $foobar;
109109
}
110+
111+
function engageMoreMagic(mixed $foobar) {
112+
echo $foobar;
113+
}

0 commit comments

Comments
 (0)