mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-14 15:12:23 +00:00
* add note about deprecated configure() method * bump rector config to ruleWithConfiguration() * remove ParameterProvider from StaticEasyPrefixer, as requires complete alias cleanup messed with scoped * add RectorConfigProvider
25 lines
570 B
PHP
25 lines
570 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Rector\Core\Configuration;
|
|
|
|
use Symplify\PackageBuilder\Parameter\ParameterProvider;
|
|
|
|
/**
|
|
* Rector native configuration provider, to keep deprecated options hidden,
|
|
* but also provide configuration that custom rules can check
|
|
*/
|
|
final class RectorConfigProvider
|
|
{
|
|
public function __construct(
|
|
private readonly ParameterProvider $parameterProvider
|
|
) {
|
|
}
|
|
|
|
public function shouldImportNames(): bool
|
|
{
|
|
return $this->parameterProvider->provideBoolParameter(Option::AUTO_IMPORT_NAMES);
|
|
}
|
|
}
|