1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

Revert "Switch to VoidProgress by default"

This reverts commit 63b46be3616d44b4fbf9dcfd73c62a56ad272f8e.
This commit is contained in:
Matthew Brown 2019-05-27 13:04:38 -04:00
parent 62a690ee4e
commit 304ffeb0a3
17 changed files with 38 additions and 28 deletions

View File

@ -13,7 +13,7 @@ use Psalm\Internal\Provider\FileStorageProvider;
use Psalm\Internal\Provider\Providers;
use Psalm\Internal\Provider\StatementsProvider;
use Psalm\Progress\Progress;
use Psalm\Progress\VoidProgress;
use Psalm\Progress\DefaultProgress;
use Psalm\Storage\ClassLikeStorage;
use Psalm\Storage\FileStorage;
use Psalm\Storage\FunctionLikeStorage;
@ -198,7 +198,7 @@ class Codebase
Progress $progress = null
) {
if ($progress === null) {
$progress = new VoidProgress();
$progress = new DefaultProgress();
}
$this->config = $config;

View File

@ -18,7 +18,7 @@ use Psalm\Internal\Scanner\FileScanner;
use Psalm\Plugin\Hook;
use Psalm\PluginRegistrationSocket;
use Psalm\Progress\Progress;
use Psalm\Progress\VoidProgress;
use Psalm\Progress\DefaultProgress;
use SimpleXMLElement;
class Config
@ -1441,7 +1441,7 @@ class Config
public function visitStubFiles(Codebase $codebase, Progress $progress = null)
{
if ($progress === null) {
$progress = new VoidProgress();
$progress = new DefaultProgress();
}
$codebase->register_stub_files = true;
@ -1554,7 +1554,7 @@ class Config
public function visitComposerAutoloadFiles(ProjectAnalyzer $project_analyzer, Progress $progress = null)
{
if ($progress === null) {
$progress = new VoidProgress();
$progress = new DefaultProgress();
}
$this->collectPredefinedConstants();

View File

@ -27,7 +27,7 @@ use Psalm\Issue\PossiblyUnusedProperty;
use Psalm\Issue\UnusedMethod;
use Psalm\Issue\UnusedProperty;
use Psalm\Progress\Progress;
use Psalm\Progress\VoidProgress;
use Psalm\Progress\DefaultProgress;
use Psalm\Type;
use Psalm\Issue\CodeIssue;
@ -214,7 +214,7 @@ class ProjectAnalyzer
$show_snippet = true
) {
if ($progress === null) {
$progress = new VoidProgress();
$progress = new DefaultProgress();
}
$this->parser_cache_provider = $providers->parser_cache_provider;

View File

@ -18,7 +18,7 @@ use Psalm\IssueBuffer;
use Psalm\Internal\Provider\ClassLikeStorageProvider;
use Psalm\Internal\Provider\FileReferenceProvider;
use Psalm\Progress\Progress;
use Psalm\Progress\VoidProgress;
use Psalm\Progress\DefaultProgress;
use Psalm\Storage\ClassLikeStorage;
use Psalm\Type;
use ReflectionProperty;
@ -670,7 +670,7 @@ class ClassLikes
public function checkClassReferences(Methods $methods, Progress $progress = null)
{
if ($progress === null) {
$progress = new VoidProgress();
$progress = new DefaultProgress();
}
$progress->debug('Checking class references' . PHP_EOL);

View File

@ -4,7 +4,6 @@ namespace Psalm\Internal\Provider;
use PhpParser;
use Psalm\Progress\Progress;
use Psalm\Progress\DefaultProgress;
use Psalm\Progress\VoidProgress;
/**
* @internal
@ -75,7 +74,7 @@ class StatementsProvider
public function getStatementsForFile($file_path, Progress $progress = null)
{
if ($progress === null) {
$progress = new VoidProgress();
$progress = new DefaultProgress();
}
$from_cache = false;

View File

@ -6,7 +6,7 @@ use PhpParser\NodeTraverser;
use Psalm\Codebase;
use Psalm\FileSource;
use Psalm\Progress\Progress;
use Psalm\Progress\VoidProgress;
use Psalm\Progress\DefaultProgress;
use Psalm\Storage\FileStorage;
use Psalm\Internal\Visitor\ReflectorVisitor;
@ -54,7 +54,7 @@ class FileScanner implements FileSource
Progress $progress = null
) {
if ($progress === null) {
$progress = new VoidProgress();
$progress = new DefaultProgress();
}
if ((!$this->will_analyze || $file_storage->deep_scan)

View File

@ -1,6 +0,0 @@
<?php
namespace Psalm\Progress;
class VoidProgress extends Progress
{
}

View File

@ -9,6 +9,7 @@ use Psalm\Internal\Analyzer\ProjectAnalyzer;
use Psalm\Plugin\Hook\AfterCodebasePopulatedInterface;
use Psalm\PluginRegistrationSocket;
use Psalm\Tests\Internal\Provider;
use Psalm\Tests\Progress\VoidProgress;
use Psalm\Tests\TestConfig;
class PluginTest extends \Psalm\Tests\TestCase
@ -61,7 +62,7 @@ class PluginTest extends \Psalm\Tests\TestCase
true,
ProjectAnalyzer::TYPE_CONSOLE,
1,
null
new VoidProgress()
);
}

View File

@ -5,6 +5,7 @@ use Psalm\Internal\Analyzer\FileAnalyzer;
use Psalm\Internal\Analyzer\ProjectAnalyzer;
use Psalm\Internal\Provider\Providers;
use Psalm\Tests\Internal\Provider;
use Psalm\Tests\Progress\VoidProgress;
use Psalm\Tests\TestConfig;
class AnalyzedMethodTest extends \Psalm\Tests\TestCase
@ -37,7 +38,7 @@ class AnalyzedMethodTest extends \Psalm\Tests\TestCase
true,
ProjectAnalyzer::TYPE_CONSOLE,
1,
null
new VoidProgress()
);
$this->project_analyzer->setPhpVersion('7.3');
}

View File

@ -5,6 +5,7 @@ use Psalm\Internal\Analyzer\FileAnalyzer;
use Psalm\Internal\Analyzer\ProjectAnalyzer;
use Psalm\Internal\Provider\Providers;
use Psalm\Tests\Internal\Provider;
use Psalm\Tests\Progress\VoidProgress;
use Psalm\Tests\TestConfig;
class CachedStorageTest extends \Psalm\Tests\TestCase
@ -37,7 +38,7 @@ class CachedStorageTest extends \Psalm\Tests\TestCase
true,
ProjectAnalyzer::TYPE_CONSOLE,
1,
null
new VoidProgress()
);
$this->project_analyzer->setPhpVersion('7.3');
}

View File

@ -5,6 +5,7 @@ use Psalm\Internal\Analyzer\FileAnalyzer;
use Psalm\Internal\Analyzer\ProjectAnalyzer;
use Psalm\Internal\Provider\Providers;
use Psalm\Tests\Internal\Provider;
use Psalm\Tests\Progress\VoidProgress;
use Psalm\Tests\TestConfig;
class ErrorAfterUpdateTest extends \Psalm\Tests\TestCase
@ -37,7 +38,7 @@ class ErrorAfterUpdateTest extends \Psalm\Tests\TestCase
true,
ProjectAnalyzer::TYPE_CONSOLE,
1,
null
new VoidProgress()
);
$this->project_analyzer->setPhpVersion('7.3');
}

View File

@ -5,6 +5,7 @@ use Psalm\Internal\Analyzer\FileAnalyzer;
use Psalm\Internal\Analyzer\ProjectAnalyzer;
use Psalm\Internal\Provider\Providers;
use Psalm\Tests\Internal\Provider;
use Psalm\Tests\Progress\VoidProgress;
use Psalm\Tests\TestConfig;
class ErrorFixTest extends \Psalm\Tests\TestCase
@ -38,7 +39,7 @@ class ErrorFixTest extends \Psalm\Tests\TestCase
true,
ProjectAnalyzer::TYPE_CONSOLE,
1,
null
new VoidProgress()
);
$this->project_analyzer->setPhpVersion('7.3');
}

View File

@ -5,6 +5,7 @@ use Psalm\Internal\Analyzer\FileAnalyzer;
use Psalm\Internal\Analyzer\ProjectAnalyzer;
use Psalm\Internal\Provider\Providers;
use Psalm\Tests\Internal\Provider;
use Psalm\Tests\Progress\VoidProgress;
use Psalm\Tests\TestConfig;
class TemporaryUpdateTest extends \Psalm\Tests\TestCase
@ -38,7 +39,7 @@ class TemporaryUpdateTest extends \Psalm\Tests\TestCase
true,
ProjectAnalyzer::TYPE_CONSOLE,
1,
null
new VoidProgress()
);
$this->project_analyzer->setPhpVersion('7.3');
}

View File

@ -7,6 +7,7 @@ use Psalm\Internal\Analyzer\FileAnalyzer;
use Psalm\Internal\Analyzer\ProjectAnalyzer;
use Psalm\Internal\Provider\Providers;
use Psalm\Tests\Internal\Provider;
use Psalm\Tests\Progress\VoidProgress;
use Psalm\Tests\TestConfig;
class CompletionTest extends \Psalm\Tests\TestCase
@ -39,7 +40,7 @@ class CompletionTest extends \Psalm\Tests\TestCase
true,
ProjectAnalyzer::TYPE_CONSOLE,
1,
null
new VoidProgress()
);
$this->project_analyzer->setPhpVersion('7.3');
$this->project_analyzer->getCodebase()->store_node_types = true;

View File

@ -7,6 +7,7 @@ use Psalm\Internal\Analyzer\FileAnalyzer;
use Psalm\Internal\Analyzer\ProjectAnalyzer;
use Psalm\Internal\Provider\Providers;
use Psalm\Tests\Internal\Provider;
use Psalm\Tests\Progress\VoidProgress;
use Psalm\Tests\TestConfig;
class SymbolLookupTest extends \Psalm\Tests\TestCase
@ -39,7 +40,7 @@ class SymbolLookupTest extends \Psalm\Tests\TestCase
true,
ProjectAnalyzer::TYPE_CONSOLE,
1,
null
new VoidProgress()
);
$this->project_analyzer->setPhpVersion('7.3');

View File

@ -0,0 +1,8 @@
<?php
namespace Psalm\Tests\Progress;
use Psalm\Progress\Progress;
class VoidProgress extends Progress
{
}

View File

@ -8,6 +8,7 @@ use Psalm\Internal\Analyzer\ProjectAnalyzer;
use Psalm\Plugin\Hook\AfterCodebasePopulatedInterface;
use Psalm\Tests\Internal\Provider;
use Psalm\Tests\Progress\EchoProgress;
use Psalm\Tests\Progress\VoidProgress;
class ProjectCheckerTest extends TestCase
{
@ -62,7 +63,7 @@ class ProjectCheckerTest extends TestCase
true,
ProjectAnalyzer::TYPE_CONSOLE,
1,
null
new VoidProgress()
);
}