1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Exit earlier if not checking content at all

This commit is contained in:
Brown 2018-11-09 10:26:16 -05:00
parent 10a5271012
commit c9d7d63001

View File

@ -133,13 +133,13 @@ class TextDocument
return;
}
if ($this->onchange_line_limit === 0) {
return;
}
$this->codebase->addTemporaryFileChanges($file_path, $contentChanges);
if ($this->onchange_line_limit !== null) {
if ($this->onchange_line_limit === 0) {
return;
}
$c = $this->codebase->getFileContents($file_path);
if (substr_count($c, "\n") > $this->onchange_line_limit) {