diff --git a/src/Checks/CheckStringy.php b/src/Checks/CheckStringy.php index 1093a5f3..24c668fc 100644 --- a/src/Checks/CheckStringy.php +++ b/src/Checks/CheckStringy.php @@ -26,7 +26,7 @@ public function checkStringy($tokens, $absFilePath) } $classPath = \trim($token[1], '\'\"'); - if (\class_exists($classPath)) { + if (! \class_exists($classPath)) { if (self::refersToDir($classPath)) { continue; } @@ -36,9 +36,11 @@ public function checkStringy($tokens, $absFilePath) $errorPrinter->printLink($absFilePath, $token[2]); $command = app('current.command'); + if (! self::ask($command, $token, $absFilePath)) { continue; } + $classPath = $this->getClassyPath($classPath); $command->info('Replacing: '.$token[1].' with: '.$classPath);