Skip to content
Permalink
Browse files

Remove unused variables (#1898)

  • Loading branch information...
TysonAndre authored and muglug committed Jul 4, 2019
1 parent efe096c commit af52ad245a8fbcb3738615d336a58d8667a428a0
@@ -1214,8 +1214,6 @@ public function getCompletionDataAtPosition(string $file_path, Position $positio
krsort($type_map);
$gap = null;
foreach ($type_map as $start_pos => list($end_pos_excluding_whitespace, $possible_type)) {
if ($offset < $start_pos) {
continue;
@@ -77,7 +77,6 @@ public static function analyze(
$old_referenced_var_ids = $try_context->referenced_var_ids;
$old_unreferenced_vars = $try_context->unreferenced_vars;
$newly_unreferenced_vars = [];
$reassigned_vars = [];
if ($statements_analyzer->analyze($stmt->stmts, $context) === false) {
return false;
@@ -125,14 +124,6 @@ public static function analyze(
$old_unreferenced_vars
)
);
foreach ($context->unreferenced_vars as $var_id => $locations) {
if (isset($old_unreferenced_vars[$var_id])
&& $old_unreferenced_vars[$var_id] !== $locations
) {
$reassigned_vars[$var_id] = $locations;
}
}
}
}
@@ -370,10 +370,6 @@ public static function parseStatements(
}
if (!self::$parser) {
$attributes = [
'comments', 'startLine', 'startFilePos', 'endFilePos',
];
self::$parser = (new PhpParser\ParserFactory())->create(PhpParser\ParserFactory::ONLY_PHP7, self::$lexer);
}

0 comments on commit af52ad2

Please sign in to comment.
You can’t perform that action at this time.