1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Add switch for newline swallowing

This commit is contained in:
Brown 2019-04-17 14:29:59 -04:00
parent cf36d50c65
commit f51b073c40

View File

@ -34,6 +34,7 @@ class FileManipulationBuffer
) { ) {
$bounds = $code_location->getSnippetBounds(); $bounds = $code_location->getSnippetBounds();
if ($swallow_newlines) {
$project_analyzer = \Psalm\Internal\Analyzer\ProjectAnalyzer::getInstance(); $project_analyzer = \Psalm\Internal\Analyzer\ProjectAnalyzer::getInstance();
$codebase = $project_analyzer->getCodebase(); $codebase = $project_analyzer->getCodebase();
@ -55,6 +56,7 @@ class FileManipulationBuffer
) { ) {
$bounds[1] += 2; $bounds[1] += 2;
} }
}
self::add( self::add(
$code_location->file_path, $code_location->file_path,