mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-18 05:48:21 +01:00
misc
This commit is contained in:
parent
822cfaf514
commit
0b4da17102
@ -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());
|
||||
|
@ -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 */
|
||||
|
@ -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 [];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user