mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Fix #560 - ignore @param $var annotations
This commit is contained in:
parent
17b27b31e8
commit
2a544c3076
@ -185,7 +185,7 @@ class CommentChecker
|
||||
}
|
||||
|
||||
if (count($line_parts) === 1 && isset($line_parts[0][0]) && $line_parts[0][0] === '$') {
|
||||
array_unshift($line_parts, 'mixed');
|
||||
continue;
|
||||
}
|
||||
|
||||
if (count($line_parts) > 1) {
|
||||
|
@ -736,6 +736,13 @@ class AnnotationTest extends TestCase
|
||||
/** @param array{b?: int, c?: string} $a */
|
||||
function foo(array $a = []) : void {}',
|
||||
],
|
||||
'allowEmptyVarAnnotation' => [
|
||||
'<?php
|
||||
/**
|
||||
* @param $x
|
||||
*/
|
||||
function example(array $x) : void {}',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user