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

Fix missing properties

This commit is contained in:
Matthew Brown 2016-11-20 22:02:26 -05:00
parent df18ad27d2
commit 4b3f63c843
5 changed files with 34 additions and 1 deletions

View File

@ -43,6 +43,11 @@ abstract class ClassLikeChecker extends SourceChecker implements StatementsSourc
*/
protected $namespace;
/**
* @var StatementsSource
*/
protected $source;
/**
* @var string
*/

View File

@ -74,6 +74,13 @@ class NamespaceChecker extends SourceChecker implements StatementsSource
}
}
/**
* @param PhpParser\Node\Stmt\ClassLike $stmt
* @param bool $check_classes
* @param bool $check_class_statements
* @param bool $update_docblocks
* @return void
*/
public function visitClassLike(PhpParser\Node\Stmt\ClassLike $stmt, $check_classes, $check_class_statements, $update_docblocks)
{
$fq_class_name = ClassLikeChecker::getFQCLNFromString($stmt->name, $this->namespace_name, []);

View File

@ -367,7 +367,7 @@ class ProjectChecker
require_once($dir_path . self::$config->autoloader);
}
$config->collectPredefinedConstants();
self::$config->collectPredefinedConstants();
}
/**

View File

@ -52,6 +52,21 @@ class StatementsChecker
*/
protected $aliased_classes = [];
/**
* @var array<string,string>
*/
protected $aliased_classes_flipped = [];
/**
* @var array<string,string>
*/
protected $aliased_constants = [];
/**
* @var array<string,string>
*/
protected $aliased_functions = [];
/**
* @var string
*/
@ -108,6 +123,7 @@ class StatementsChecker
$this->class_name = $this->source->getClassName();
$this->parent_class = $this->source->getParentClass();
$this->aliased_classes = $this->source->getAliasedClasses();
$this->aliased_classes_flipped = $this->source->getAliasedClassesFlipped();
$this->aliased_constants = $this->source->getAliasedConstants();
$this->aliased_functions = $this->source->getAliasedFunctions();
$this->suppressed_issues = $this->source->getSuppressedIssues();

View File

@ -13,6 +13,11 @@ interface StatementsSource
*/
public function getAliasedClasses();
/**
* @return array<string>
*/
public function getAliasedClassesFlipped();
/**
* Gets a list of all aliased constants
*