File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change 1616
1717use Humbug \PhpScoper \Logger \UpdateConsoleLogger ;
1818use Humbug \SelfUpdate \Updater ;
19- use PHAR ;
19+ use Phar ;
2020use Symfony \Component \Console \Command \Command ;
2121use Symfony \Component \Console \Input \InputInterface ;
2222use Symfony \Component \Console \Input \InputOption ;
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ final class NameStmtPrefixer extends NodeVisitorAbstract
5353 private $ whitelist ;
5454 private $ globalWhitelister ;
5555 private $ nameResolver ;
56+ private $ classReflector ;
5657
5758 /**
5859 * @param string $prefix
@@ -70,6 +71,7 @@ public function __construct(
7071 $ this ->whitelist = $ whitelist ;
7172 $ this ->globalWhitelister = $ globalWhitelister ;
7273 $ this ->nameResolver = $ nameResolver ;
74+ $ this ->classReflector = (new BetterReflection ())->classReflector ();
7375 }
7476
7577 /**
@@ -124,14 +126,8 @@ private function prefixName(Name $name): Node
124126 // Check if the class can be prefixed
125127 if (false === ($ parentNode instanceof ConstFetch || $ parentNode instanceof FuncCall)) {
126128 if (1 === count ($ resolvedName ->parts )) {
127- try {
128- var_dump ($ resolvedName ->toString ());
129- var_dump ($ parentNode ->name );
130- $ classInfo = (new BetterReflection ())->classReflector ()->reflect ($ resolvedName ->toString ());
129+ $ classInfo = $ this ->classReflector ->reflect ($ resolvedName ->toString ());
131130
132- } catch (\Throwable $ t ) {
133- $ y = '' ;
134- }
135131 //&& false === ($this->globalWhitelister)($resolvedName->toString())
136132 //if (false === ($this->globalWhitelister)($resolvedName->toString())) {
137133 // return $resolvedName;
You can’t perform that action at this time.
0 commit comments