1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Remove functionality that overlaps with phpcs FunctionCommentSniff

This commit is contained in:
Matthew Brown 2016-12-23 22:48:36 +00:00
parent ea74388c7d
commit dfa089f8df
2 changed files with 0 additions and 30 deletions

View File

@ -794,17 +794,6 @@ abstract class FunctionLikeChecker extends SourceChecker implements StatementsSo
$line_number = $docblock_param['line_number'];
if (!array_key_exists($param_name, $function_param_names)) {
$code_location->setCommentLine($line_number);
if (IssueBuffer::accepts(
new InvalidDocblock(
'Parameter $' . $param_name .' does not appear in the argument list for ' .
$cased_method_id,
$code_location
)
)) {
return false;
}
continue;
}

View File

@ -83,25 +83,6 @@ class AnnotationTest extends PHPUnit_Framework_TestCase
$file_checker->check(true, true, $context);
}
/**
* @expectedException \Psalm\Exception\CodeException
* @expectedExceptionMessage InvalidDocblock - somefile.php:3 - Parameter $bar does not appear in the argument list for fooBar
*/
public function testExtraneousDocblockParam()
{
$stmts = self::$parser->parse('<?php
/**
* @param int $bar
*/
function fooBar() : void {
}
');
$file_checker = new FileChecker('somefile.php', $stmts);
$context = new Context('somefile.php');
$file_checker->check(true, true, $context);
}
/**
* @expectedException \Psalm\Exception\CodeException
* @expectedExceptionMessage InvalidDocblock