1
0
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:
Matthew Brown 2018-03-30 17:46:12 -04:00
parent 17b27b31e8
commit 2a544c3076
2 changed files with 8 additions and 1 deletions

View File

@ -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) {

View File

@ -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 {}',
],
];
}