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

Fix tests

This commit is contained in:
Matt Brown 2017-01-19 12:15:42 -05:00
parent 7116585e85
commit fd290c41d4
2 changed files with 16 additions and 3 deletions

View File

@ -420,6 +420,7 @@ class FileChecker extends SourceChecker implements StatementsSource
*/
public function visitAndAnalyzeMethods(Context $file_context = null, $update_docblocks = false)
{
$this->project_checker->registerVisitedFile($this->file_path);
$this->visit($file_context);
$this->analyze($update_docblocks);
}

View File

@ -831,6 +831,15 @@ class ProjectChecker
$this->fake_files[$file_path] = $file_contents;
}
/**
* @param string $file_path
* @return void
*/
public function registerVisitedFile($file_path)
{
$this->visited_files[$file_path] = true;
}
/**
* @param string $file_path
* @return string
@ -845,7 +854,8 @@ class ProjectChecker
}
/**
* @param string $fq_class_name
* @param string $fq_class_name
* @param string|null $file_path
* @return void
*/
public function addFullyQualifiedClassName($fq_class_name, $file_path = null)
@ -863,7 +873,8 @@ class ProjectChecker
}
/**
* @param string $fq_class_name
* @param string $fq_class_name
* @param string|null $file_path
* @return void
*/
public function addFullyQualifiedInterfaceName($fq_class_name, $file_path = null)
@ -881,7 +892,8 @@ class ProjectChecker
}
/**
* @param string $fq_class_name
* @param string $fq_class_name
* @param string|null $file_path
* @return void
*/
public function addFullyQualifiedTraitName($fq_class_name, $file_path = null)