This commit is contained in:
TomasVotruba 2017-09-10 15:41:37 +02:00
parent 822cfaf514
commit 0b4da17102
3 changed files with 5 additions and 3 deletions

View File

@ -66,6 +66,7 @@ final class DeprecationExtractor
$finder = Finder::create()
->files()
->name('*.php')
->exclude('Tests') // obscure code, not common in /app
->in($directories);
return iterator_to_array($finder->getIterator());

View File

@ -95,9 +95,10 @@ final class TypeResolver extends NodeVisitorAbstract
private function getTypeFromNewNode(New_ $newNode): string
{
if ($newNode->class instanceof Variable) {
// can be anything (dynamic)
$variableName = $newNode->class->name;
dump($variableName);
dump($this->typeContext->getTypeForVariable($variableName));
return $this->typeContext->getTypeForVariable($variableName);
} elseif ($newNode->class instanceof Name) {
/** @var FullyQualified $fqnName */

View File

@ -40,7 +40,7 @@ final class ConstructorPropertyTypesExtractor
private function getConstructorParametersWithTypes(Class_ $classNode): array
{
$className = $classNode->namespacedName->toString();
if (! class_exists($className)) {
if (! class_exists($className, false)) {
return [];
}