mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 21:38:22 +01:00
Updated Rector to commit 617c04a9be1cef77fb23805109a9023fbc09b59d
617c04a9be
[TypeDeclaration] Separated inferred and no types (#90)
This commit is contained in:
parent
3689a516db
commit
90a746a8cf
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
require_once __DIR__ . '/rector.php';
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Core\Bootstrap\RectorConfigsResolver;
|
||||
use Rector\Core\Console\ConsoleApplication;
|
||||
use Rector\Core\Console\Style\SymfonyStyleFactory;
|
||||
use Rector\Core\DependencyInjection\RectorContainerFactory;
|
||||
use Rector\Core\HttpKernel\RectorKernel;
|
||||
use RectorPrefix20210521\Symplify\PackageBuilder\Console\ShellCode;
|
||||
use RectorPrefix20210521\Symplify\PackageBuilder\Reflection\PrivatesCaller;
|
||||
use RectorPrefix20210522\Symplify\PackageBuilder\Console\ShellCode;
|
||||
use RectorPrefix20210522\Symplify\PackageBuilder\Reflection\PrivatesCaller;
|
||||
// @ intentionally: continue anyway
|
||||
@\ini_set('memory_limit', '-1');
|
||||
// Performance boost
|
||||
@ -18,20 +18,20 @@ use RectorPrefix20210521\Symplify\PackageBuilder\Reflection\PrivatesCaller;
|
||||
\gc_disable();
|
||||
\define('__RECTOR_RUNNING__', \true);
|
||||
// Require Composer autoload.php
|
||||
$autoloadIncluder = new \RectorPrefix20210521\AutoloadIncluder();
|
||||
$autoloadIncluder = new \RectorPrefix20210522\AutoloadIncluder();
|
||||
$autoloadIncluder->includeDependencyOrRepositoryVendorAutoloadIfExists();
|
||||
// load extracted PHPStan with its own preload.php
|
||||
$extractedPhpstanAutoload = __DIR__ . '/../vendor/phpstan/phpstan-extracted/vendor/autoload.php';
|
||||
if (\file_exists($extractedPhpstanAutoload)) {
|
||||
require_once $extractedPhpstanAutoload;
|
||||
} elseif (\RectorPrefix20210521\should_include_preload()) {
|
||||
} elseif (\RectorPrefix20210522\should_include_preload()) {
|
||||
require_once __DIR__ . '/../preload.php';
|
||||
}
|
||||
require_once __DIR__ . '/../src/constants.php';
|
||||
$autoloadIncluder->loadIfExistsAndNotLoadedYet(__DIR__ . '/../vendor/scoper-autoload.php');
|
||||
$autoloadIncluder->autoloadProjectAutoloaderFile();
|
||||
$autoloadIncluder->autoloadFromCommandLine();
|
||||
$symfonyStyleFactory = new \Rector\Core\Console\Style\SymfonyStyleFactory(new \RectorPrefix20210521\Symplify\PackageBuilder\Reflection\PrivatesCaller());
|
||||
$symfonyStyleFactory = new \Rector\Core\Console\Style\SymfonyStyleFactory(new \RectorPrefix20210522\Symplify\PackageBuilder\Reflection\PrivatesCaller());
|
||||
$symfonyStyle = $symfonyStyleFactory->create();
|
||||
$rectorConfigsResolver = new \Rector\Core\Bootstrap\RectorConfigsResolver();
|
||||
try {
|
||||
@ -40,7 +40,7 @@ try {
|
||||
$container = $rectorContainerFactory->createFromBootstrapConfigs($bootstrapConfigs);
|
||||
} catch (\Throwable $throwable) {
|
||||
$symfonyStyle->error($throwable->getMessage());
|
||||
exit(\RectorPrefix20210521\Symplify\PackageBuilder\Console\ShellCode::ERROR);
|
||||
exit(\RectorPrefix20210522\Symplify\PackageBuilder\Console\ShellCode::ERROR);
|
||||
}
|
||||
/** @var ConsoleApplication $application */
|
||||
$application = $container->get(\Rector\Core\Console\ConsoleApplication::class);
|
||||
@ -94,7 +94,7 @@ final class AutoloadIncluder
|
||||
require_once $filePath;
|
||||
}
|
||||
}
|
||||
\class_alias('RectorPrefix20210521\\AutoloadIncluder', 'AutoloadIncluder', \false);
|
||||
\class_alias('RectorPrefix20210522\\AutoloadIncluder', 'AutoloadIncluder', \false);
|
||||
// load local php-parser only in prefixed version or development repository
|
||||
function should_include_preload() : bool
|
||||
{
|
||||
|
@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Core\Bootstrap\ExtensionConfigResolver;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$containerConfigurator->import(__DIR__ . '/services.php');
|
||||
$containerConfigurator->import(__DIR__ . '/services-rules.php');
|
||||
$containerConfigurator->import(__DIR__ . '/services-packages.php');
|
||||
|
@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Core\Configuration\Option;
|
||||
use Rector\Core\ValueObject\ProjectType;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$parameters = $containerConfigurator->parameters();
|
||||
// paths and extensions
|
||||
$parameters->set(\Rector\Core\Configuration\Option::PATHS, []);
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->defaults()->public()->autowire()->autoconfigure();
|
||||
$services->load('Rector\\', __DIR__ . '/../packages')->exclude([
|
||||
|
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Core\Configuration\Option;
|
||||
use Rector\PSR4\Composer\PSR4NamespaceMatcher;
|
||||
use Rector\PSR4\Contract\PSR4AutoloadNamespaceMatcherInterface;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$parameters = $containerConfigurator->parameters();
|
||||
$parameters->set(\Rector\Core\Configuration\Option::TYPES_TO_REMOVE_STATIC_FROM, []);
|
||||
$services = $containerConfigurator->services();
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use RectorPrefix20210521\Composer\Semver\VersionParser;
|
||||
use RectorPrefix20210521\Doctrine\Inflector\Inflector;
|
||||
use RectorPrefix20210521\Doctrine\Inflector\Rules\English\InflectorFactory;
|
||||
use RectorPrefix20210521\Ergebnis\Json\Printer\Printer;
|
||||
use RectorPrefix20210521\Ergebnis\Json\Printer\PrinterInterface;
|
||||
use RectorPrefix20210521\Idiosyncratic\EditorConfig\EditorConfig;
|
||||
use RectorPrefix20210521\Nette\Caching\Cache;
|
||||
use RectorPrefix20210522\Composer\Semver\VersionParser;
|
||||
use RectorPrefix20210522\Doctrine\Inflector\Inflector;
|
||||
use RectorPrefix20210522\Doctrine\Inflector\Rules\English\InflectorFactory;
|
||||
use RectorPrefix20210522\Ergebnis\Json\Printer\Printer;
|
||||
use RectorPrefix20210522\Ergebnis\Json\Printer\PrinterInterface;
|
||||
use RectorPrefix20210522\Idiosyncratic\EditorConfig\EditorConfig;
|
||||
use RectorPrefix20210522\Nette\Caching\Cache;
|
||||
use PhpParser\BuilderFactory;
|
||||
use PhpParser\Lexer;
|
||||
use PhpParser\NodeFinder;
|
||||
@ -34,70 +34,70 @@ use Rector\Core\PhpParser\Parser\PhpParserLexerFactory;
|
||||
use Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory;
|
||||
use Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocator\IntermediateSourceLocator;
|
||||
use Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocatorProvider\DynamicSourceLocatorProvider;
|
||||
use RectorPrefix20210521\Symfony\Component\Console\Application as SymfonyApplication;
|
||||
use RectorPrefix20210521\Symfony\Component\Console\Style\SymfonyStyle;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use function RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\service;
|
||||
use RectorPrefix20210521\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser;
|
||||
use RectorPrefix20210521\Symplify\PackageBuilder\Console\Command\CommandNaming;
|
||||
use RectorPrefix20210521\Symplify\PackageBuilder\Console\Style\SymfonyStyleFactory;
|
||||
use RectorPrefix20210521\Symplify\PackageBuilder\Parameter\ParameterProvider;
|
||||
use RectorPrefix20210521\Symplify\PackageBuilder\Php\TypeChecker;
|
||||
use RectorPrefix20210521\Symplify\PackageBuilder\Reflection\PrivatesAccessor;
|
||||
use RectorPrefix20210521\Symplify\PackageBuilder\Reflection\PrivatesCaller;
|
||||
use RectorPrefix20210521\Symplify\PackageBuilder\Strings\StringFormatConverter;
|
||||
use RectorPrefix20210521\Symplify\SmartFileSystem\FileSystemFilter;
|
||||
use RectorPrefix20210521\Symplify\SmartFileSystem\FileSystemGuard;
|
||||
use RectorPrefix20210521\Symplify\SmartFileSystem\Finder\FinderSanitizer;
|
||||
use RectorPrefix20210521\Symplify\SmartFileSystem\Json\JsonFileSystem;
|
||||
use RectorPrefix20210521\Symplify\SmartFileSystem\SmartFileSystem;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\Console\Application as SymfonyApplication;
|
||||
use RectorPrefix20210522\Symfony\Component\Console\Style\SymfonyStyle;
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use function RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\service;
|
||||
use RectorPrefix20210522\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser;
|
||||
use RectorPrefix20210522\Symplify\PackageBuilder\Console\Command\CommandNaming;
|
||||
use RectorPrefix20210522\Symplify\PackageBuilder\Console\Style\SymfonyStyleFactory;
|
||||
use RectorPrefix20210522\Symplify\PackageBuilder\Parameter\ParameterProvider;
|
||||
use RectorPrefix20210522\Symplify\PackageBuilder\Php\TypeChecker;
|
||||
use RectorPrefix20210522\Symplify\PackageBuilder\Reflection\PrivatesAccessor;
|
||||
use RectorPrefix20210522\Symplify\PackageBuilder\Reflection\PrivatesCaller;
|
||||
use RectorPrefix20210522\Symplify\PackageBuilder\Strings\StringFormatConverter;
|
||||
use RectorPrefix20210522\Symplify\SmartFileSystem\FileSystemFilter;
|
||||
use RectorPrefix20210522\Symplify\SmartFileSystem\FileSystemGuard;
|
||||
use RectorPrefix20210522\Symplify\SmartFileSystem\Finder\FinderSanitizer;
|
||||
use RectorPrefix20210522\Symplify\SmartFileSystem\Json\JsonFileSystem;
|
||||
use RectorPrefix20210522\Symplify\SmartFileSystem\SmartFileSystem;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->defaults()->public()->autowire()->autoconfigure();
|
||||
$services->load('Rector\\Core\\', __DIR__ . '/../src')->exclude([__DIR__ . '/../src/Rector', __DIR__ . '/../src/Exception', __DIR__ . '/../src/DependencyInjection/CompilerPass', __DIR__ . '/../src/DependencyInjection/Loader', __DIR__ . '/../src/HttpKernel', __DIR__ . '/../src/ValueObject', __DIR__ . '/../src/Bootstrap', __DIR__ . '/../src/PhpParser/Node/CustomNode', __DIR__ . '/../src/functions', __DIR__ . '/../src/constants.php', __DIR__ . '/../src/PhpParser/NodeVisitor/CreatedByRuleNodeVisitor.php']);
|
||||
$services->alias(\RectorPrefix20210521\Symfony\Component\Console\Application::class, \Rector\Core\Console\ConsoleApplication::class);
|
||||
$services->set(\RectorPrefix20210521\Symplify\SmartFileSystem\FileSystemGuard::class);
|
||||
$services->set(\RectorPrefix20210521\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser::class);
|
||||
$services->alias(\RectorPrefix20210522\Symfony\Component\Console\Application::class, \Rector\Core\Console\ConsoleApplication::class);
|
||||
$services->set(\RectorPrefix20210522\Symplify\SmartFileSystem\FileSystemGuard::class);
|
||||
$services->set(\RectorPrefix20210522\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser::class);
|
||||
$services->set(\PhpParser\ParserFactory::class);
|
||||
$services->set(\PhpParser\BuilderFactory::class);
|
||||
$services->set(\PhpParser\NodeVisitor\CloningVisitor::class);
|
||||
$services->set(\PhpParser\NodeFinder::class);
|
||||
$services->set(\PhpParser\Parser::class)->factory([\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\Core\PhpParser\Parser\NikicPhpParserFactory::class), 'create']);
|
||||
$services->set(\PhpParser\Lexer::class)->factory([\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\Core\PhpParser\Parser\PhpParserLexerFactory::class), 'create']);
|
||||
$services->set(\PhpParser\Parser::class)->factory([\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\Core\PhpParser\Parser\NikicPhpParserFactory::class), 'create']);
|
||||
$services->set(\PhpParser\Lexer::class)->factory([\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\Core\PhpParser\Parser\PhpParserLexerFactory::class), 'create']);
|
||||
// symplify/package-builder
|
||||
$services->set(\RectorPrefix20210521\Symplify\PackageBuilder\Reflection\PrivatesAccessor::class);
|
||||
$services->set(\RectorPrefix20210521\Symplify\PackageBuilder\Reflection\PrivatesCaller::class);
|
||||
$services->set(\RectorPrefix20210521\Symplify\SmartFileSystem\Finder\FinderSanitizer::class);
|
||||
$services->set(\RectorPrefix20210521\Symplify\SmartFileSystem\FileSystemFilter::class);
|
||||
$services->set(\RectorPrefix20210521\Symplify\PackageBuilder\Parameter\ParameterProvider::class)->arg('$container', \RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\service('service_container'));
|
||||
$services->set(\RectorPrefix20210521\Symplify\PackageBuilder\Console\Command\CommandNaming::class);
|
||||
$services->set(\RectorPrefix20210521\Symplify\SmartFileSystem\SmartFileSystem::class);
|
||||
$services->set(\RectorPrefix20210521\Symplify\PackageBuilder\Strings\StringFormatConverter::class);
|
||||
$services->set(\RectorPrefix20210521\Symplify\PackageBuilder\Console\Style\SymfonyStyleFactory::class);
|
||||
$services->set(\RectorPrefix20210521\Symfony\Component\Console\Style\SymfonyStyle::class)->factory([\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\service(\RectorPrefix20210521\Symplify\PackageBuilder\Console\Style\SymfonyStyleFactory::class), 'create']);
|
||||
$services->set(\RectorPrefix20210521\Symplify\SmartFileSystem\Json\JsonFileSystem::class);
|
||||
$services->set(\RectorPrefix20210522\Symplify\PackageBuilder\Reflection\PrivatesAccessor::class);
|
||||
$services->set(\RectorPrefix20210522\Symplify\PackageBuilder\Reflection\PrivatesCaller::class);
|
||||
$services->set(\RectorPrefix20210522\Symplify\SmartFileSystem\Finder\FinderSanitizer::class);
|
||||
$services->set(\RectorPrefix20210522\Symplify\SmartFileSystem\FileSystemFilter::class);
|
||||
$services->set(\RectorPrefix20210522\Symplify\PackageBuilder\Parameter\ParameterProvider::class)->arg('$container', \RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\service('service_container'));
|
||||
$services->set(\RectorPrefix20210522\Symplify\PackageBuilder\Console\Command\CommandNaming::class);
|
||||
$services->set(\RectorPrefix20210522\Symplify\SmartFileSystem\SmartFileSystem::class);
|
||||
$services->set(\RectorPrefix20210522\Symplify\PackageBuilder\Strings\StringFormatConverter::class);
|
||||
$services->set(\RectorPrefix20210522\Symplify\PackageBuilder\Console\Style\SymfonyStyleFactory::class);
|
||||
$services->set(\RectorPrefix20210522\Symfony\Component\Console\Style\SymfonyStyle::class)->factory([\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\service(\RectorPrefix20210522\Symplify\PackageBuilder\Console\Style\SymfonyStyleFactory::class), 'create']);
|
||||
$services->set(\RectorPrefix20210522\Symplify\SmartFileSystem\Json\JsonFileSystem::class);
|
||||
$services->set(\PhpParser\NodeVisitor\NodeConnectingVisitor::class);
|
||||
$services->set(\RectorPrefix20210521\Doctrine\Inflector\Rules\English\InflectorFactory::class);
|
||||
$services->set(\RectorPrefix20210521\Doctrine\Inflector\Inflector::class)->factory([\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\service(\RectorPrefix20210521\Doctrine\Inflector\Rules\English\InflectorFactory::class), 'build']);
|
||||
$services->set(\RectorPrefix20210521\Composer\Semver\VersionParser::class);
|
||||
$services->set(\RectorPrefix20210521\Symplify\PackageBuilder\Php\TypeChecker::class);
|
||||
$services->set(\RectorPrefix20210522\Doctrine\Inflector\Rules\English\InflectorFactory::class);
|
||||
$services->set(\RectorPrefix20210522\Doctrine\Inflector\Inflector::class)->factory([\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\service(\RectorPrefix20210522\Doctrine\Inflector\Rules\English\InflectorFactory::class), 'build']);
|
||||
$services->set(\RectorPrefix20210522\Composer\Semver\VersionParser::class);
|
||||
$services->set(\RectorPrefix20210522\Symplify\PackageBuilder\Php\TypeChecker::class);
|
||||
// phpdoc parser
|
||||
$services->set(\PHPStan\PhpDocParser\Lexer\Lexer::class);
|
||||
$services->alias(\PHPStan\PhpDocParser\Parser\PhpDocParser::class, \Rector\BetterPhpDocParser\PhpDocParser\BetterPhpDocParser::class);
|
||||
// cache
|
||||
$services->set(\PHPStan\Dependency\DependencyResolver::class)->factory([\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createDependencyResolver']);
|
||||
$services->set(\PHPStan\File\FileHelper::class)->factory([\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createFileHelper']);
|
||||
$services->set(\RectorPrefix20210521\Nette\Caching\Cache::class)->factory([\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\Caching\Cache\NetteCacheFactory::class), 'create']);
|
||||
$services->set(\PHPStan\Dependency\DependencyResolver::class)->factory([\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createDependencyResolver']);
|
||||
$services->set(\PHPStan\File\FileHelper::class)->factory([\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createFileHelper']);
|
||||
$services->set(\RectorPrefix20210522\Nette\Caching\Cache::class)->factory([\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\Caching\Cache\NetteCacheFactory::class), 'create']);
|
||||
// type resolving
|
||||
$services->set(\Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocator\IntermediateSourceLocator::class);
|
||||
$services->alias(\PHPStan\PhpDocParser\Parser\TypeParser::class, \Rector\BetterPhpDocParser\PhpDocParser\BetterTypeParser::class);
|
||||
// PHPStan services
|
||||
$services->set(\PHPStan\Reflection\ReflectionProvider::class)->factory([\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createReflectionProvider']);
|
||||
$services->set(\PHPStan\Analyser\NodeScopeResolver::class)->factory([\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createNodeScopeResolver']);
|
||||
$services->set(\PHPStan\Analyser\ScopeFactory::class)->factory([\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createScopeFactory']);
|
||||
$services->set(\PHPStan\PhpDoc\TypeNodeResolver::class)->factory([\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createTypeNodeResolver']);
|
||||
$services->set(\Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocatorProvider\DynamicSourceLocatorProvider::class)->factory([\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createDynamicSourceLocatorProvider']);
|
||||
$services->set(\RectorPrefix20210521\Ergebnis\Json\Printer\Printer::class);
|
||||
$services->alias(\RectorPrefix20210521\Ergebnis\Json\Printer\PrinterInterface::class, \RectorPrefix20210521\Ergebnis\Json\Printer\Printer::class);
|
||||
$services->set(\RectorPrefix20210521\Idiosyncratic\EditorConfig\EditorConfig::class);
|
||||
$services->set(\PHPStan\Reflection\ReflectionProvider::class)->factory([\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createReflectionProvider']);
|
||||
$services->set(\PHPStan\Analyser\NodeScopeResolver::class)->factory([\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createNodeScopeResolver']);
|
||||
$services->set(\PHPStan\Analyser\ScopeFactory::class)->factory([\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createScopeFactory']);
|
||||
$services->set(\PHPStan\PhpDoc\TypeNodeResolver::class)->factory([\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createTypeNodeResolver']);
|
||||
$services->set(\Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocatorProvider\DynamicSourceLocatorProvider::class)->factory([\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createDynamicSourceLocatorProvider']);
|
||||
$services->set(\RectorPrefix20210522\Ergebnis\Json\Printer\Printer::class);
|
||||
$services->alias(\RectorPrefix20210522\Ergebnis\Json\Printer\PrinterInterface::class, \RectorPrefix20210522\Ergebnis\Json\Printer\Printer::class);
|
||||
$services->set(\RectorPrefix20210522\Idiosyncratic\EditorConfig\EditorConfig::class);
|
||||
};
|
||||
|
@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\DependencyInjection\Rector\Class_\ActionInjectionToConstructorInjectionRector;
|
||||
use Rector\DependencyInjection\Rector\Variable\ReplaceVariableByPropertyFetchRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\DependencyInjection\Rector\Class_\ActionInjectionToConstructorInjectionRector::class);
|
||||
$services->set(\Rector\DependencyInjection\Rector\Variable\ReplaceVariableByPropertyFetchRector::class);
|
||||
|
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Carbon\Rector\MethodCall\ChangeCarbonSingularMethodCallToPluralRector;
|
||||
use Rector\Carbon\Rector\MethodCall\ChangeDiffForHumansArgsRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
# source: https://carbon.nesbot.com/docs/#api-carbon-2
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\Carbon\Rector\MethodCall\ChangeDiffForHumansArgsRector::class);
|
||||
$services->set(\Rector\Carbon\Rector\MethodCall\ChangeCarbonSingularMethodCallToPluralRector::class);
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector;
|
||||
use Rector\CodeQualityStrict\Rector\If_\MoveOutMethodCallInsideIfConditionRector;
|
||||
use Rector\CodeQualityStrict\Rector\Variable\MoveVariableDeclarationNearReferenceRector;
|
||||
use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector;
|
||||
use Rector\CodingStyle\Rector\MethodCall\UseMessageVariableForSprintfInSymfonyStyleRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\CodeQualityStrict\Rector\If_\MoveOutMethodCallInsideIfConditionRector::class);
|
||||
$services->set(\Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector::class);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\CodeQuality\Rector\Array_\ArrayThisCallToThisMethodCallRector;
|
||||
use Rector\CodeQuality\Rector\Array_\CallableThisArrayToAnonymousFunctionRector;
|
||||
@ -75,8 +75,8 @@ use Rector\CodingStyle\Rector\FuncCall\CallUserFuncToMethodCallRector;
|
||||
use Rector\Php52\Rector\Property\VarToPublicPropertyRector;
|
||||
use Rector\Php71\Rector\FuncCall\RemoveExtraParametersRector;
|
||||
use Rector\Renaming\Rector\FuncCall\RenameFunctionRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\CodeQuality\Rector\Assign\CombinedAssignRector::class);
|
||||
$services->set(\Rector\CodeQuality\Rector\BooleanAnd\SimplifyEmptyArrayCheckRector::class);
|
||||
|
@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\CodingStyle\Rector\MethodCall\UseMessageVariableForSprintfInSymfonyStyleRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\CodingStyle\Rector\MethodCall\UseMessageVariableForSprintfInSymfonyStyleRector::class);
|
||||
};
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\CodingStyle\Rector\Assign\ManualJsonStringToJsonEncodeArrayRector;
|
||||
use Rector\CodingStyle\Rector\Assign\PHPStormVarAnnotationRector;
|
||||
@ -34,8 +34,8 @@ use Rector\CodingStyle\Rector\Use_\RemoveUnusedAliasRector;
|
||||
use Rector\CodingStyle\Rector\Use_\SeparateMultiUseImportsRector;
|
||||
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
|
||||
use Rector\Transform\Rector\FuncCall\FuncCallToConstFetchRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\CodingStyle\Rector\Assign\PHPStormVarAnnotationRector::class);
|
||||
$services->set(\Rector\CodingStyle\Rector\If_\NullableCompareToNullRector::class);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\CodeQuality\Rector\Return_\SimplifyUselessVariableRector;
|
||||
use Rector\DeadCode\Rector\Array_\RemoveDuplicatedArrayKeyRector;
|
||||
@ -46,8 +46,8 @@ use Rector\DeadCode\Rector\Switch_\RemoveDuplicatedCaseInSwitchRector;
|
||||
use Rector\DeadCode\Rector\Ternary\TernaryToBooleanOrFalseToBooleanAndRector;
|
||||
use Rector\DeadCode\Rector\TryCatch\RemoveDeadTryCatchRector;
|
||||
use Rector\PHPUnit\Rector\ClassMethod\RemoveEmptyTestMethodRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\DeadCode\Rector\If_\UnwrapFutureCompatibleIfFunctionExistsRector::class);
|
||||
$services->set(\Rector\DeadCode\Rector\If_\UnwrapFutureCompatibleIfPhpVersionRector::class);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Defluent\Rector\ClassMethod\ReturnThisRemoveRector;
|
||||
use Rector\Defluent\Rector\MethodCall\FluentChainMethodCallToNormalMethodCallRector;
|
||||
@ -11,10 +11,10 @@ use Rector\Defluent\Rector\MethodCall\NewFluentChainMethodCallToNonFluentRector;
|
||||
use Rector\Defluent\Rector\Return_\DefluentReturnMethodCallRector;
|
||||
use Rector\Defluent\Rector\Return_\ReturnFluentChainMethodCallToNormalMethodCallRector;
|
||||
use Rector\Defluent\Rector\Return_\ReturnNewFluentChainMethodCallToNonFluentRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
// @see https://ocramius.github.io/blog/fluent-interfaces-are-evil/
|
||||
// @see https://www.yegor256.com/2018/03/13/fluent-interfaces.html
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
// variable/property
|
||||
$services->set(\Rector\Defluent\Rector\MethodCall\FluentChainMethodCallToNormalMethodCallRector::class);
|
||||
|
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Core\Configuration\Option;
|
||||
use Rector\Core\ValueObject\PhpVersion;
|
||||
use Rector\DowngradePhp53\Rector\Dir\DirConstToFileConstRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$parameters = $containerConfigurator->parameters();
|
||||
$parameters->set(\Rector\Core\Configuration\Option::PHP_VERSION_FEATURES, \Rector\Core\ValueObject\PhpVersion::PHP_53);
|
||||
$services = $containerConfigurator->services();
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Core\Configuration\Option;
|
||||
use Rector\Core\ValueObject\PhpVersion;
|
||||
@ -14,8 +14,8 @@ use Rector\DowngradePhp70\Rector\GroupUse\SplitGroupedUseImportsRector;
|
||||
use Rector\DowngradePhp70\Rector\New_\DowngradeAnonymousClassRector;
|
||||
use Rector\DowngradePhp70\Rector\Spaceship\DowngradeSpaceshipRector;
|
||||
use Rector\DowngradePhp70\Rector\String_\DowngradeGeneratedScalarTypesRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$parameters = $containerConfigurator->parameters();
|
||||
$parameters->set(\Rector\Core\Configuration\Option::PHP_VERSION_FEATURES, \Rector\Core\ValueObject\PhpVersion::PHP_56);
|
||||
$services = $containerConfigurator->services();
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Core\Configuration\Option;
|
||||
use Rector\Core\ValueObject\PhpVersion;
|
||||
@ -14,8 +14,8 @@ use Rector\DowngradePhp71\Rector\FunctionLike\DowngradeVoidTypeDeclarationRector
|
||||
use Rector\DowngradePhp71\Rector\List_\DowngradeKeysInListRector;
|
||||
use Rector\DowngradePhp71\Rector\String_\DowngradeNegativeStringOffsetToStrlenRector;
|
||||
use Rector\DowngradePhp71\Rector\TryCatch\DowngradePipeToMultiCatchExceptionRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$parameters = $containerConfigurator->parameters();
|
||||
$parameters->set(\Rector\Core\Configuration\Option::PHP_VERSION_FEATURES, \Rector\Core\ValueObject\PhpVersion::PHP_70);
|
||||
$services = $containerConfigurator->services();
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Core\Configuration\Option;
|
||||
use Rector\Core\ValueObject\PhpVersion;
|
||||
@ -9,8 +9,8 @@ use Rector\DowngradePhp72\Rector\Class_\DowngradeParameterTypeWideningRector;
|
||||
use Rector\DowngradePhp72\Rector\FuncCall\DowngradePregUnmatchedAsNullConstantRector;
|
||||
use Rector\DowngradePhp72\Rector\FuncCall\DowngradeStreamIsattyRector;
|
||||
use Rector\DowngradePhp72\Rector\FunctionLike\DowngradeObjectTypeDeclarationRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$parameters = $containerConfigurator->parameters();
|
||||
$parameters->set(\Rector\Core\Configuration\Option::PHP_VERSION_FEATURES, \Rector\Core\ValueObject\PhpVersion::PHP_71);
|
||||
$services = $containerConfigurator->services();
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Core\Configuration\Option;
|
||||
use Rector\Core\ValueObject\PhpVersion;
|
||||
@ -10,8 +10,8 @@ use Rector\DowngradePhp73\Rector\FuncCall\DowngradeTrailingCommasInFunctionCalls
|
||||
use Rector\DowngradePhp73\Rector\FuncCall\SetCookieOptionsArrayToArgumentsRector;
|
||||
use Rector\DowngradePhp73\Rector\List_\DowngradeListReferenceAssignmentRector;
|
||||
use Rector\DowngradePhp73\Rector\String_\DowngradeFlexibleHeredocSyntaxRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$parameters = $containerConfigurator->parameters();
|
||||
$parameters->set(\Rector\Core\Configuration\Option::PHP_VERSION_FEATURES, \Rector\Core\ValueObject\PhpVersion::PHP_72);
|
||||
$services = $containerConfigurator->services();
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Core\Configuration\Option;
|
||||
use Rector\Core\ValueObject\PhpVersion;
|
||||
@ -16,8 +16,8 @@ use Rector\DowngradePhp74\Rector\FuncCall\DowngradeStripTagsCallWithArrayRector;
|
||||
use Rector\DowngradePhp74\Rector\Identical\DowngradeFreadFwriteFalsyToNegationRector;
|
||||
use Rector\DowngradePhp74\Rector\LNumber\DowngradeNumericLiteralSeparatorRector;
|
||||
use Rector\DowngradePhp74\Rector\Property\DowngradeTypedPropertyRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$parameters = $containerConfigurator->parameters();
|
||||
$parameters->set(\Rector\Core\Configuration\Option::PHP_VERSION_FEATURES, \Rector\Core\ValueObject\PhpVersion::PHP_73);
|
||||
$services = $containerConfigurator->services();
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Core\Configuration\Option;
|
||||
use Rector\Core\ValueObject\PhpVersion;
|
||||
@ -16,8 +16,8 @@ use Rector\DowngradePhp80\Rector\FunctionLike\DowngradeMixedTypeDeclarationRecto
|
||||
use Rector\DowngradePhp80\Rector\FunctionLike\DowngradeUnionTypeDeclarationRector;
|
||||
use Rector\DowngradePhp80\Rector\NullsafeMethodCall\DowngradeNullsafeToTernaryOperatorRector;
|
||||
use Rector\DowngradePhp80\Rector\Property\DowngradeUnionTypeTypedPropertyRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$parameters = $containerConfigurator->parameters();
|
||||
$parameters->set(\Rector\Core\Configuration\Option::PHP_VERSION_FEATURES, \Rector\Core\ValueObject\PhpVersion::PHP_74);
|
||||
$services = $containerConfigurator->services();
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector;
|
||||
use Rector\EarlyReturn\Rector\Foreach_\ReturnAfterToEarlyOnBreakRector;
|
||||
@ -14,8 +14,8 @@ use Rector\EarlyReturn\Rector\If_\RemoveAlwaysElseRector;
|
||||
use Rector\EarlyReturn\Rector\Return_\PreparedValueToEarlyReturnRector;
|
||||
use Rector\EarlyReturn\Rector\Return_\ReturnBinaryAndToEarlyReturnRector;
|
||||
use Rector\EarlyReturn\Rector\Return_\ReturnBinaryOrToEarlyReturnRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector::class);
|
||||
$services->set(\Rector\EarlyReturn\Rector\If_\ChangeAndIfToEarlyReturnRector::class);
|
||||
|
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
|
||||
use Rector\Renaming\ValueObject\MethodCallRename;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use Symplify\SymfonyPhpConfig\ValueObjectInliner;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\Renaming\Rector\MethodCall\RenameMethodRector::class)->call('configure', [[\Rector\Renaming\Rector\MethodCall\RenameMethodRector::METHOD_CALL_RENAMES => \Symplify\SymfonyPhpConfig\ValueObjectInliner::inline([
|
||||
// Rename is now move, specific for files.
|
||||
|
@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Symfony\Rector\ClassMethod\RemoveServiceFromSensioRouteRector;
|
||||
use Rector\Symfony\Rector\ClassMethod\ReplaceSensioRouteAnnotationWithSymfonyRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\Symfony\Rector\ClassMethod\ReplaceSensioRouteAnnotationWithSymfonyRector::class);
|
||||
$services->set(\Rector\Symfony\Rector\ClassMethod\RemoveServiceFromSensioRouteRector::class);
|
||||
|
@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Symfony\Rector\ClassMethod\TemplateAnnotationToThisRenderRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\Symfony\Rector\ClassMethod\TemplateAnnotationToThisRenderRector::class);
|
||||
};
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Defluent\Rector\MethodCall\FluentChainMethodCallToNormalMethodCallRector;
|
||||
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
|
||||
@ -10,9 +10,9 @@ use Rector\Transform\Rector\FuncCall\FuncCallToMethodCallRector;
|
||||
use Rector\Transform\Rector\StaticCall\StaticCallToFuncCallRector;
|
||||
use Rector\Transform\ValueObject\FuncCallToMethodCall;
|
||||
use Rector\Transform\ValueObject\StaticCallToFuncCall;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use Symplify\SymfonyPhpConfig\ValueObjectInliner;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
# both uses "%classes_to_defluent%
|
||||
$services->set(\Rector\Defluent\Rector\MethodCall\FluentChainMethodCallToNormalMethodCallRector::class);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Core\ValueObject\Visibility;
|
||||
use Rector\NetteToSymfony\Rector\MethodCall\WrapTransParameterNameRector;
|
||||
@ -10,9 +10,9 @@ use Rector\Renaming\Rector\Name\RenameClassRector;
|
||||
use Rector\Renaming\ValueObject\MethodCallRename;
|
||||
use Rector\Visibility\Rector\ClassMethod\ChangeMethodVisibilityRector;
|
||||
use Rector\Visibility\ValueObject\ChangeMethodVisibility;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use Symplify\SymfonyPhpConfig\ValueObjectInliner;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\Visibility\Rector\ClassMethod\ChangeMethodVisibilityRector::class)->call('configure', [[\Rector\Visibility\Rector\ClassMethod\ChangeMethodVisibilityRector::METHOD_VISIBILITIES => \Symplify\SymfonyPhpConfig\ValueObjectInliner::inline([new \Rector\Visibility\ValueObject\ChangeMethodVisibility('Kdyby\\Events\\Subscriber', 'getSubscribedEvents', \Rector\Core\ValueObject\Visibility::STATIC)])]]);
|
||||
$services->set(\Rector\Renaming\Rector\MethodCall\RenameMethodRector::class)->call('configure', [[\Rector\Renaming\Rector\MethodCall\RenameMethodRector::METHOD_CALL_RENAMES => \Symplify\SymfonyPhpConfig\ValueObjectInliner::inline([new \Rector\Renaming\ValueObject\MethodCallRename('Kdyby\\Translation\\Translator', 'translate', 'trans'), new \Rector\Renaming\ValueObject\MethodCallRename('Kdyby\\RabbitMq\\IConsumer', 'process', 'execute')])]]);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use PHPStan\Type\ObjectWithoutClassType;
|
||||
use PHPStan\Type\StringType;
|
||||
@ -20,9 +20,9 @@ use Rector\TypeDeclaration\Rector\ClassMethod\AddParamTypeDeclarationRector;
|
||||
use Rector\TypeDeclaration\Rector\ClassMethod\AddReturnTypeDeclarationRector;
|
||||
use Rector\TypeDeclaration\ValueObject\AddParamTypeDeclaration;
|
||||
use Rector\TypeDeclaration\ValueObject\AddReturnTypeDeclaration;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use Symplify\SymfonyPhpConfig\ValueObjectInliner;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$parameters = $containerConfigurator->parameters();
|
||||
$parameters->set(\Rector\Core\Configuration\Option::AUTO_IMPORT_NAMES, \true);
|
||||
$services = $containerConfigurator->services();
|
||||
|
@ -1,14 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
|
||||
use Rector\Renaming\ValueObject\MethodCallRename;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use Symplify\SymfonyPhpConfig\ValueObjectInliner;
|
||||
# https://github.com/Seldaek/monolog/commit/39f8a20e6dadc0194e846b254c5f23d1c732290b#diff-dce565f403e044caa5e6a0d988339430
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\Renaming\Rector\MethodCall\RenameMethodRector::class)->call('configure', [[\Rector\Renaming\Rector\MethodCall\RenameMethodRector::METHOD_CALL_RENAMES => \Symplify\SymfonyPhpConfig\ValueObjectInliner::inline([new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'addDebug', 'debug'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'addInfo', 'info'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'addNotice', 'notice'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'addWarning', 'warning'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'addError', 'error'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'addCritical', 'critical'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'addAlert', 'alert'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'addEmergency', 'emergency'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'warn', 'warning'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'err', 'error'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'crit', 'critical'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'emerg', 'emergency')])]]);
|
||||
};
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Arguments\Rector\FuncCall\SwapFuncCallArgumentsRector;
|
||||
use Rector\Arguments\ValueObject\SwapFuncCallArguments;
|
||||
@ -13,9 +13,9 @@ use Rector\Removing\Rector\FuncCall\RemoveFuncCallArgRector;
|
||||
use Rector\Removing\ValueObject\RemoveFuncCallArg;
|
||||
use Rector\Renaming\Rector\ConstFetch\RenameConstantRector;
|
||||
use Rector\Renaming\Rector\FuncCall\RenameFunctionRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use Symplify\SymfonyPhpConfig\ValueObjectInliner;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
# https://stackoverflow.com/a/1390625/1348344
|
||||
# https://github.com/philip/MySQLConverterTool/blob/master/Converter.php
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Naming\Rector\Assign\RenameVariableToMatchMethodCallReturnTypeRector;
|
||||
use Rector\Naming\Rector\Class_\RenamePropertyToMatchTypeRector;
|
||||
@ -12,8 +12,8 @@ use Rector\Naming\Rector\ClassMethod\RenameVariableToMatchNewTypeRector;
|
||||
use Rector\Naming\Rector\Foreach_\RenameForeachValueVariableToMatchExprVariableRector;
|
||||
use Rector\Naming\Rector\Foreach_\RenameForeachValueVariableToMatchMethodCallReturnTypeRector;
|
||||
use Rector\Naming\Rector\Property\MakeBoolPropertyRespectIsHasWasMethodNamingRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\Naming\Rector\ClassMethod\RenameParamToMatchTypeRector::class);
|
||||
$services->set(\Rector\Naming\Rector\Class_\RenamePropertyToMatchTypeRector::class);
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Order\Rector\Class_\OrderClassConstantsByIntegerValueRector;
|
||||
use Rector\Order\Rector\Class_\OrderConstantsByVisibilityRector;
|
||||
use Rector\Order\Rector\Class_\OrderMethodsByVisibilityRector;
|
||||
use Rector\Order\Rector\Class_\OrderPrivateMethodsByUseRector;
|
||||
use Rector\Order\Rector\Class_\OrderPropertiesByVisibilityRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\Order\Rector\Class_\OrderPrivateMethodsByUseRector::class);
|
||||
$services->set(\Rector\Order\Rector\Class_\OrderClassConstantsByIntegerValueRector::class);
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Php52\Rector\Property\VarToPublicPropertyRector;
|
||||
use Rector\Php52\Rector\Switch_\ContinueToBreakInSwitchRector;
|
||||
use Rector\Removing\Rector\FuncCall\RemoveFuncCallArgRector;
|
||||
use Rector\Removing\ValueObject\RemoveFuncCallArg;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use Symplify\SymfonyPhpConfig\ValueObjectInliner;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\Php52\Rector\Property\VarToPublicPropertyRector::class);
|
||||
$services->set(\Rector\Php52\Rector\Switch_\ContinueToBreakInSwitchRector::class);
|
||||
|
@ -1,14 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Php53\Rector\AssignRef\ClearReturnNewByReferenceRector;
|
||||
use Rector\Php53\Rector\FuncCall\DirNameFileConstantToDirConstantRector;
|
||||
use Rector\Php53\Rector\Ternary\TernaryToElvisRector;
|
||||
use Rector\Php53\Rector\Variable\ReplaceHttpServerVarsByServerRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\Php53\Rector\Ternary\TernaryToElvisRector::class);
|
||||
$services->set(\Rector\Php53\Rector\FuncCall\DirNameFileConstantToDirConstantRector::class);
|
||||
|
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Php54\Rector\Break_\RemoveZeroBreakContinueRector;
|
||||
use Rector\Php54\Rector\FuncCall\RemoveReferenceFromCallRector;
|
||||
use Rector\Renaming\Rector\FuncCall\RenameFunctionRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\Renaming\Rector\FuncCall\RenameFunctionRector::class)->call('configure', [[\Rector\Renaming\Rector\FuncCall\RenameFunctionRector::OLD_FUNCTION_TO_NEW_FUNCTION => ['mysqli_param_count' => 'mysqli_stmt_param_count']]]);
|
||||
$services->set(\Rector\Php54\Rector\FuncCall\RemoveReferenceFromCallRector::class);
|
||||
|
@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Php55\Rector\Class_\ClassConstantToSelfClassRector;
|
||||
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\Php55\Rector\String_\StringClassNameToClassConstantRector::class);
|
||||
$services->set(\Rector\Php55\Rector\Class_\ClassConstantToSelfClassRector::class);
|
||||
|
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Php56\Rector\FuncCall\PowToExpRector;
|
||||
use Rector\Php56\Rector\FunctionLike\AddDefaultValueForUndefinedVariableRector;
|
||||
use Rector\Renaming\Rector\FuncCall\RenameFunctionRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\Php56\Rector\FuncCall\PowToExpRector::class);
|
||||
$services->set(\Rector\Renaming\Rector\FuncCall\RenameFunctionRector::class)->call('configure', [[\Rector\Renaming\Rector\FuncCall\RenameFunctionRector::OLD_FUNCTION_TO_NEW_FUNCTION => ['mcrypt_generic_end' => 'mcrypt_generic_deinit', 'set_socket_blocking' => 'stream_set_blocking', 'ocibindbyname' => 'oci_bind_by_name', 'ocicancel' => 'oci_cancel', 'ocicolumnisnull' => 'oci_field_is_null', 'ocicolumnname' => 'oci_field_name', 'ocicolumnprecision' => 'oci_field_precision', 'ocicolumnscale' => 'oci_field_scale', 'ocicolumnsize' => 'oci_field_size', 'ocicolumntype' => 'oci_field_type', 'ocicolumntyperaw' => 'oci_field_type_raw', 'ocicommit' => 'oci_commit', 'ocidefinebyname' => 'oci_define_by_name', 'ocierror' => 'oci_error', 'ociexecute' => 'oci_execute', 'ocifetch' => 'oci_fetch', 'ocifetchstatement' => 'oci_fetch_all', 'ocifreecursor' => 'oci_free_statement', 'ocifreestatement' => 'oci_free_statement', 'ociinternaldebug' => 'oci_internal_debug', 'ocilogoff' => 'oci_close', 'ocilogon' => 'oci_connect', 'ocinewcollection' => 'oci_new_collection', 'ocinewcursor' => 'oci_new_cursor', 'ocinewdescriptor' => 'oci_new_descriptor', 'ocinlogon' => 'oci_new_connect', 'ocinumcols' => 'oci_num_fields', 'ociparse' => 'oci_parse', 'ociplogon' => 'oci_pconnect', 'ociresult' => 'oci_result', 'ocirollback' => 'oci_rollback', 'ocirowcount' => 'oci_num_rows', 'ociserverversion' => 'oci_server_version', 'ocisetprefetch' => 'oci_set_prefetch', 'ocistatementtype' => 'oci_statement_type']]]);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Php70\Rector\Assign\ListSplitStringRector;
|
||||
use Rector\Php70\Rector\Assign\ListSwapArrayOrderRector;
|
||||
@ -22,8 +22,8 @@ use Rector\Php70\Rector\Switch_\ReduceMultipleDefaultSwitchRector;
|
||||
use Rector\Php70\Rector\Ternary\TernaryToNullCoalescingRector;
|
||||
use Rector\Php70\Rector\Ternary\TernaryToSpaceshipRector;
|
||||
use Rector\Php70\Rector\Variable\WrapVariableVariableNameInCurlyBracesRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$containerConfigurator->import(__DIR__ . '/mysql-to-mysqli.php');
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\Php70\Rector\ClassMethod\Php4ConstructorRector::class);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Php71\Rector\Assign\AssignArrayToStringRector;
|
||||
use Rector\Php71\Rector\BinaryOp\BinaryOpBetweenNumberAndStringRector;
|
||||
@ -10,8 +10,8 @@ use Rector\Php71\Rector\FuncCall\CountOnNullRector;
|
||||
use Rector\Php71\Rector\FuncCall\RemoveExtraParametersRector;
|
||||
use Rector\Php71\Rector\List_\ListToArrayDestructRector;
|
||||
use Rector\Php71\Rector\TryCatch\MultiExceptionCatchRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\Php71\Rector\BooleanOr\IsIterableRector::class);
|
||||
$services->set(\Rector\Php71\Rector\TryCatch\MultiExceptionCatchRector::class);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Php72\Rector\Assign\ListEachRector;
|
||||
use Rector\Php72\Rector\Assign\ReplaceEachAssignmentWithKeyCurrentRector;
|
||||
@ -14,8 +14,8 @@ use Rector\Php72\Rector\FuncCall\StringsAssertNakedRector;
|
||||
use Rector\Php72\Rector\Unset_\UnsetCastRector;
|
||||
use Rector\Php72\Rector\While_\WhileEachToForeachRector;
|
||||
use Rector\Renaming\Rector\FuncCall\RenameFunctionRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\Php72\Rector\While_\WhileEachToForeachRector::class);
|
||||
$services->set(\Rector\Php72\Rector\Assign\ListEachRector::class);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Php52\Rector\Switch_\ContinueToBreakInSwitchRector;
|
||||
use Rector\Php73\Rector\BooleanOr\IsCountableRector;
|
||||
@ -13,8 +13,8 @@ use Rector\Php73\Rector\FuncCall\SensitiveDefineRector;
|
||||
use Rector\Php73\Rector\FuncCall\StringifyStrNeedlesRector;
|
||||
use Rector\Php73\Rector\String_\SensitiveHereNowDocRector;
|
||||
use Rector\Renaming\Rector\FuncCall\RenameFunctionRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\Php73\Rector\BooleanOr\IsCountableRector::class);
|
||||
$services->set(\Rector\Php73\Rector\FuncCall\ArrayKeyFirstLastRector::class);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Php74\Rector\Assign\NullCoalescingOperatorRector;
|
||||
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
|
||||
@ -18,8 +18,8 @@ use Rector\Php74\Rector\Property\RestoreDefaultNullToNullableTypePropertyRector;
|
||||
use Rector\Php74\Rector\Property\TypedPropertyRector;
|
||||
use Rector\Php74\Rector\StaticCall\ExportToReflectionFunctionRector;
|
||||
use Rector\Renaming\Rector\FuncCall\RenameFunctionRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\Php74\Rector\Property\TypedPropertyRector::class);
|
||||
$services->set(\Rector\Renaming\Rector\FuncCall\RenameFunctionRector::class)->call('configure', [[\Rector\Renaming\Rector\FuncCall\RenameFunctionRector::OLD_FUNCTION_TO_NEW_FUNCTION => [
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Arguments\Rector\ClassMethod\ArgumentAdderRector;
|
||||
use Rector\Arguments\Rector\FuncCall\FunctionArgumentDefaultValueReplacerRector;
|
||||
@ -25,9 +25,9 @@ use Rector\Php80\Rector\Ternary\GetDebugTypeRector;
|
||||
use Rector\Renaming\Rector\FuncCall\RenameFunctionRector;
|
||||
use Rector\Transform\Rector\StaticCall\StaticCallToFuncCallRector;
|
||||
use Rector\Transform\ValueObject\StaticCallToFuncCall;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use Symplify\SymfonyPhpConfig\ValueObjectInliner;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\Php80\Rector\FunctionLike\UnionTypesRector::class);
|
||||
$services->set(\Rector\Php80\Rector\NotIdentical\StrContainsRector::class);
|
||||
|
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Php81\Rector\Class_\MyCLabsClassToEnumRector;
|
||||
use Rector\Php81\Rector\MethodCall\MyCLabsMethodCallToEnumConstRector;
|
||||
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnNeverTypeRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\TypeDeclaration\Rector\ClassMethod\ReturnNeverTypeRector::class);
|
||||
$services->set(\Rector\Php81\Rector\Class_\MyCLabsClassToEnumRector::class);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\PHPOffice\Rector\MethodCall\ChangeConditionalGetConditionRector;
|
||||
use Rector\PHPOffice\Rector\MethodCall\ChangeConditionalReturnedCellRector;
|
||||
@ -22,11 +22,11 @@ use Rector\Renaming\Rector\Name\RenameClassRector;
|
||||
use Rector\Renaming\Rector\StaticCall\RenameStaticMethodRector;
|
||||
use Rector\Renaming\ValueObject\MethodCallRename;
|
||||
use Rector\Renaming\ValueObject\RenameStaticMethod;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use Symplify\SymfonyPhpConfig\ValueObjectInliner;
|
||||
# see https://github.com/PHPOffice/PhpSpreadsheet/blob/master/docs/topics/migration-from-PHPExcel.md
|
||||
# inspired https://github.com/PHPOffice/PhpSpreadsheet/blob/87f71e1930b497b36e3b9b1522117dfa87096d2b/src/PhpSpreadsheet/Helper/Migrator.php
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\PHPOffice\Rector\StaticCall\ChangeIOFactoryArgumentRector::class);
|
||||
$services->set(\Rector\PHPOffice\Rector\StaticCall\ChangeSearchLocationToRegisterReaderRector::class);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\PhpSpecToPHPUnit\Rector\Class_\AddMockPropertiesRector;
|
||||
use Rector\PhpSpecToPHPUnit\Rector\Class_\PhpSpecClassToPHPUnitClassRector;
|
||||
@ -10,9 +10,9 @@ use Rector\PhpSpecToPHPUnit\Rector\ClassMethod\PhpSpecMethodToPHPUnitMethodRecto
|
||||
use Rector\PhpSpecToPHPUnit\Rector\MethodCall\PhpSpecMocksToPHPUnitMocksRector;
|
||||
use Rector\PhpSpecToPHPUnit\Rector\MethodCall\PhpSpecPromisesToPHPUnitAssertRector;
|
||||
use Rector\PhpSpecToPHPUnit\Rector\Variable\MockVariableToPropertyFetchRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
# see: https://gnugat.github.io/2015/09/23/phpunit-with-phpspec.html
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
# 1. first convert mocks
|
||||
$services->set(\Rector\PhpSpecToPHPUnit\Rector\MethodCall\PhpSpecMocksToPHPUnitMocksRector::class);
|
||||
|
@ -1,14 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
|
||||
use Rector\Renaming\Rector\Name\RenameClassRector;
|
||||
use Rector\Renaming\ValueObject\MethodCallRename;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use Symplify\SymfonyPhpConfig\ValueObjectInliner;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\Renaming\Rector\MethodCall\RenameMethodRector::class)->call('configure', [[\Rector\Renaming\Rector\MethodCall\RenameMethodRector::METHOD_CALL_RENAMES => \Symplify\SymfonyPhpConfig\ValueObjectInliner::inline([
|
||||
// @see http://www.phpspec.net/en/stable/manual/upgrading-to-phpspec-3.html
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use PHPStan\Type\ArrayType;
|
||||
use PHPStan\Type\MixedType;
|
||||
use Rector\TypeDeclaration\Rector\ClassMethod\AddReturnTypeDeclarationRector;
|
||||
use Rector\TypeDeclaration\ValueObject\AddReturnTypeDeclaration;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use Symplify\SymfonyPhpConfig\ValueObjectInliner;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$arrayType = new \PHPStan\Type\ArrayType(new \PHPStan\Type\MixedType(), new \PHPStan\Type\MixedType());
|
||||
$services->set(\Rector\TypeDeclaration\Rector\ClassMethod\AddReturnTypeDeclarationRector::class)->call('configure', [[\Rector\TypeDeclaration\Rector\ClassMethod\AddReturnTypeDeclarationRector::METHOD_RETURN_TYPES => \Symplify\SymfonyPhpConfig\ValueObjectInliner::inline([new \Rector\TypeDeclaration\ValueObject\AddReturnTypeDeclaration('PhpSpec\\ObjectBehavior', 'getMatchers', $arrayType)])]]);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\Privatization\Rector\Class_\ChangeLocalPropertyToVariableRector;
|
||||
use Rector\Privatization\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector;
|
||||
@ -13,8 +13,8 @@ use Rector\Privatization\Rector\MethodCall\PrivatizeLocalGetterToPropertyRector;
|
||||
use Rector\Privatization\Rector\Property\ChangeReadOnlyPropertyWithDefaultValueToConstantRector;
|
||||
use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector;
|
||||
use Rector\Privatization\Rector\Property\PrivatizeLocalPropertyToPrivatePropertyRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\Privatization\Rector\Class_\FinalizeClassesWithoutChildrenRector::class);
|
||||
$services->set(\Rector\Privatization\Rector\ClassMethod\ChangeGlobalVariablesToPropertiesRector::class);
|
||||
|
@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\PSR4\Rector\FileWithoutNamespace\NormalizeNamespaceByPSR4ComposerAutoloadRector;
|
||||
use Rector\PSR4\Rector\Namespace_\MultipleClassFileToPsr4ClassesRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\PSR4\Rector\FileWithoutNamespace\NormalizeNamespaceByPSR4ComposerAutoloadRector::class);
|
||||
$services->set(\Rector\PSR4\Rector\Namespace_\MultipleClassFileToPsr4ClassesRector::class);
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\TypeDeclaration\Rector\ClassMethod\AddMethodCallBasedStrictParamTypeRector;
|
||||
use Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector;
|
||||
@ -11,8 +11,8 @@ use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictTypedPropertyR
|
||||
use Rector\TypeDeclaration\Rector\Closure\AddClosureReturnTypeRector;
|
||||
use Rector\TypeDeclaration\Rector\Param\ParamTypeFromStrictTypedPropertyRector;
|
||||
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictConstructorRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\TypeDeclaration\Rector\Closure\AddClosureReturnTypeRector::class);
|
||||
$services->set(\Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictTypedPropertyRector::class);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\TypeDeclaration\Rector\ClassMethod\AddArrayParamDocTypeRector;
|
||||
use Rector\TypeDeclaration\Rector\ClassMethod\AddArrayReturnDocTypeRector;
|
||||
@ -10,8 +10,8 @@ use Rector\TypeDeclaration\Rector\Closure\AddClosureReturnTypeRector;
|
||||
use Rector\TypeDeclaration\Rector\FunctionLike\ParamTypeDeclarationRector;
|
||||
use Rector\TypeDeclaration\Rector\FunctionLike\ReturnTypeDeclarationRector;
|
||||
use Rector\TypeDeclaration\Rector\Property\PropertyTypeDeclarationRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\TypeDeclaration\Rector\FunctionLike\ParamTypeDeclarationRector::class);
|
||||
$services->set(\Rector\TypeDeclaration\Rector\FunctionLike\ReturnTypeDeclarationRector::class);
|
||||
|
@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20210521;
|
||||
namespace RectorPrefix20210522;
|
||||
|
||||
use Rector\DeadCode\Rector\If_\UnwrapFutureCompatibleIfFunctionExistsRector;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
return static function (\RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\DeadCode\Rector\If_\UnwrapFutureCompatibleIfFunctionExistsRector::class);
|
||||
};
|
||||
|
@ -6,14 +6,14 @@ namespace Rector\BetterPhpDocParser\Comment;
|
||||
use PhpParser\Comment;
|
||||
use PhpParser\Node;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use RectorPrefix20210521\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser;
|
||||
use RectorPrefix20210522\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser;
|
||||
final class CommentsMerger
|
||||
{
|
||||
/**
|
||||
* @var \Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser
|
||||
*/
|
||||
private $simpleCallableNodeTraverser;
|
||||
public function __construct(\RectorPrefix20210521\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser $simpleCallableNodeTraverser)
|
||||
public function __construct(\RectorPrefix20210522\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser $simpleCallableNodeTraverser)
|
||||
{
|
||||
$this->simpleCallableNodeTraverser = $simpleCallableNodeTraverser;
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\BetterPhpDocParser\Contract;
|
||||
|
||||
use RectorPrefix20210521\Symplify\SimplePhpDocParser\Contract\PhpDocNodeVisitorInterface;
|
||||
interface BasePhpDocNodeVisitorInterface extends \RectorPrefix20210521\Symplify\SimplePhpDocParser\Contract\PhpDocNodeVisitorInterface
|
||||
use RectorPrefix20210522\Symplify\SimplePhpDocParser\Contract\PhpDocNodeVisitorInterface;
|
||||
interface BasePhpDocNodeVisitorInterface extends \RectorPrefix20210522\Symplify\SimplePhpDocParser\Contract\PhpDocNodeVisitorInterface
|
||||
{
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\BetterPhpDocParser\PhpDocInfo;
|
||||
|
||||
use RectorPrefix20210521\Nette\Utils\Strings;
|
||||
use RectorPrefix20210522\Nette\Utils\Strings;
|
||||
use PHPStan\PhpDocParser\Ast\Node;
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\InvalidTagValueNode;
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\MethodTagValueNode;
|
||||
@ -28,7 +28,7 @@ use Rector\ChangesReporting\Collector\RectorChangeCollector;
|
||||
use Rector\Core\Configuration\CurrentNodeProvider;
|
||||
use Rector\Core\Exception\NotImplementedYetException;
|
||||
use Rector\StaticTypeMapper\StaticTypeMapper;
|
||||
use RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
||||
use RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
||||
/**
|
||||
* @template TNode as \PHPStan\PhpDocParser\Ast\Node
|
||||
* @see \Rector\Tests\BetterPhpDocParser\PhpDocInfo\PhpDocInfo\PhpDocInfoTest
|
||||
@ -397,7 +397,7 @@ final class PhpDocInfo
|
||||
return \true;
|
||||
}
|
||||
// has a single node with missing start_end
|
||||
$phpDocNodeTraverser = new \RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||
$phpDocNodeTraverser = new \RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||
$changedPhpDocNodeVisitor = new \Rector\BetterPhpDocParser\PhpDocNodeVisitor\ChangedPhpDocNodeVisitor();
|
||||
$phpDocNodeTraverser->addPhpDocNodeVisitor($changedPhpDocNodeVisitor);
|
||||
$phpDocNodeTraverser->traverse($this->phpDocNode);
|
||||
@ -437,7 +437,7 @@ final class PhpDocInfo
|
||||
}
|
||||
private function isFnmatch(string $currentValue, string $desiredValue) : bool
|
||||
{
|
||||
if (!\RectorPrefix20210521\Nette\Utils\Strings::contains($desiredValue, '*')) {
|
||||
if (!\RectorPrefix20210522\Nette\Utils\Strings::contains($desiredValue, '*')) {
|
||||
return \false;
|
||||
}
|
||||
return \fnmatch($desiredValue, $currentValue, \FNM_NOESCAPE);
|
||||
|
@ -6,7 +6,7 @@ namespace Rector\BetterPhpDocParser\PhpDocInfo;
|
||||
use PHPStan\PhpDocParser\Lexer\Lexer;
|
||||
use PHPStan\PhpDocParser\Parser\TokenIterator;
|
||||
use Rector\BetterPhpDocParser\ValueObject\Parser\BetterTokenIterator;
|
||||
use RectorPrefix20210521\Symplify\PackageBuilder\Reflection\PrivatesAccessor;
|
||||
use RectorPrefix20210522\Symplify\PackageBuilder\Reflection\PrivatesAccessor;
|
||||
final class TokenIteratorFactory
|
||||
{
|
||||
/**
|
||||
@ -21,7 +21,7 @@ final class TokenIteratorFactory
|
||||
* @var \Symplify\PackageBuilder\Reflection\PrivatesAccessor
|
||||
*/
|
||||
private $privatesAccessor;
|
||||
public function __construct(\PHPStan\PhpDocParser\Lexer\Lexer $lexer, \RectorPrefix20210521\Symplify\PackageBuilder\Reflection\PrivatesAccessor $privatesAccessor)
|
||||
public function __construct(\PHPStan\PhpDocParser\Lexer\Lexer $lexer, \RectorPrefix20210522\Symplify\PackageBuilder\Reflection\PrivatesAccessor $privatesAccessor)
|
||||
{
|
||||
$this->lexer = $lexer;
|
||||
$this->privatesAccessor = $privatesAccessor;
|
||||
|
@ -3,7 +3,7 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\BetterPhpDocParser\PhpDocManipulator;
|
||||
|
||||
use RectorPrefix20210521\Nette\Utils\Strings;
|
||||
use RectorPrefix20210522\Nette\Utils\Strings;
|
||||
use PhpParser\Node;
|
||||
use Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode;
|
||||
use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo;
|
||||
@ -79,7 +79,7 @@ final class PhpDocClassRenamer
|
||||
$doctrineAnnotationTagValueNode->changeSilentValue($newClass);
|
||||
continue;
|
||||
}
|
||||
$newContent = \RectorPrefix20210521\Nette\Utils\Strings::replace($className, '#\\b' . \preg_quote($oldClass, '#') . '\\b#', $newClass);
|
||||
$newContent = \RectorPrefix20210522\Nette\Utils\Strings::replace($className, '#\\b' . \preg_quote($oldClass, '#') . '\\b#', $newClass);
|
||||
if ($newContent === $className) {
|
||||
continue;
|
||||
}
|
||||
|
@ -7,9 +7,9 @@ use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode;
|
||||
use Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface;
|
||||
use Rector\BetterPhpDocParser\DataProvider\CurrentTokenIteratorProvider;
|
||||
use Rector\BetterPhpDocParser\ValueObject\Parser\BetterTokenIterator;
|
||||
use RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
||||
use RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\CloningPhpDocNodeVisitor;
|
||||
use RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\ParentConnectingPhpDocNodeVisitor;
|
||||
use RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
||||
use RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\CloningPhpDocNodeVisitor;
|
||||
use RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\ParentConnectingPhpDocNodeVisitor;
|
||||
/**
|
||||
* @see \Rector\Tests\BetterPhpDocParser\PhpDocNodeMapperTest
|
||||
*/
|
||||
@ -34,7 +34,7 @@ final class PhpDocNodeMapper
|
||||
/**
|
||||
* @param BasePhpDocNodeVisitorInterface[] $phpDocNodeVisitors
|
||||
*/
|
||||
public function __construct(\Rector\BetterPhpDocParser\DataProvider\CurrentTokenIteratorProvider $currentTokenIteratorProvider, \RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\ParentConnectingPhpDocNodeVisitor $parentConnectingPhpDocNodeVisitor, \RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\CloningPhpDocNodeVisitor $cloningPhpDocNodeVisitor, array $phpDocNodeVisitors)
|
||||
public function __construct(\Rector\BetterPhpDocParser\DataProvider\CurrentTokenIteratorProvider $currentTokenIteratorProvider, \RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\ParentConnectingPhpDocNodeVisitor $parentConnectingPhpDocNodeVisitor, \RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\CloningPhpDocNodeVisitor $cloningPhpDocNodeVisitor, array $phpDocNodeVisitors)
|
||||
{
|
||||
$this->currentTokenIteratorProvider = $currentTokenIteratorProvider;
|
||||
$this->parentConnectingPhpDocNodeVisitor = $parentConnectingPhpDocNodeVisitor;
|
||||
@ -44,13 +44,13 @@ final class PhpDocNodeMapper
|
||||
public function transform(\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode $phpDocNode, \Rector\BetterPhpDocParser\ValueObject\Parser\BetterTokenIterator $betterTokenIterator) : void
|
||||
{
|
||||
$this->currentTokenIteratorProvider->setBetterTokenIterator($betterTokenIterator);
|
||||
$parentPhpDocNodeTraverser = new \RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||
$parentPhpDocNodeTraverser = new \RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||
$parentPhpDocNodeTraverser->addPhpDocNodeVisitor($this->parentConnectingPhpDocNodeVisitor);
|
||||
$parentPhpDocNodeTraverser->traverse($phpDocNode);
|
||||
$cloningPhpDocNodeTraverser = new \RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||
$cloningPhpDocNodeTraverser = new \RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||
$cloningPhpDocNodeTraverser->addPhpDocNodeVisitor($this->cloningPhpDocNodeVisitor);
|
||||
$cloningPhpDocNodeTraverser->traverse($phpDocNode);
|
||||
$phpDocNodeTraverser = new \RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||
$phpDocNodeTraverser = new \RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||
foreach ($this->phpDocNodeVisitors as $phpDocNodeVisitor) {
|
||||
$phpDocNodeTraverser->addPhpDocNodeVisitor($phpDocNodeVisitor);
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ declare (strict_types=1);
|
||||
namespace Rector\BetterPhpDocParser\PhpDocNodeTraverser;
|
||||
|
||||
use Rector\BetterPhpDocParser\PhpDocNodeVisitor\ChangedPhpDocNodeVisitor;
|
||||
use RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
||||
use RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
||||
final class ChangedPhpDocNodeTraverserFactory
|
||||
{
|
||||
/**
|
||||
@ -15,9 +15,9 @@ final class ChangedPhpDocNodeTraverserFactory
|
||||
{
|
||||
$this->changedPhpDocNodeVisitor = $changedPhpDocNodeVisitor;
|
||||
}
|
||||
public function create() : \RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeTraverser
|
||||
public function create() : \RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeTraverser
|
||||
{
|
||||
$changedPhpDocNodeTraverser = new \RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||
$changedPhpDocNodeTraverser = new \RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||
$changedPhpDocNodeTraverser->addPhpDocNodeVisitor($this->changedPhpDocNodeVisitor);
|
||||
return $changedPhpDocNodeTraverser;
|
||||
}
|
||||
|
@ -8,8 +8,8 @@ use PHPStan\PhpDocParser\Ast\Type\ArrayTypeNode;
|
||||
use Rector\BetterPhpDocParser\Attributes\AttributeMirrorer;
|
||||
use Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface;
|
||||
use Rector\BetterPhpDocParser\ValueObject\Type\SpacingAwareArrayTypeNode;
|
||||
use RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class ArrayTypePhpDocNodeVisitor extends \RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||
use RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class ArrayTypePhpDocNodeVisitor extends \RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||
{
|
||||
/**
|
||||
* @var \Rector\BetterPhpDocParser\Attributes\AttributeMirrorer
|
||||
|
@ -8,8 +8,8 @@ use PHPStan\PhpDocParser\Ast\Type\CallableTypeNode;
|
||||
use Rector\BetterPhpDocParser\Attributes\AttributeMirrorer;
|
||||
use Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface;
|
||||
use Rector\BetterPhpDocParser\ValueObject\Type\SpacingAwareCallableTypeNode;
|
||||
use RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class CallableTypePhpDocNodeVisitor extends \RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||
use RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class CallableTypePhpDocNodeVisitor extends \RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||
{
|
||||
/**
|
||||
* @var \Rector\BetterPhpDocParser\Attributes\AttributeMirrorer
|
||||
|
@ -5,8 +5,8 @@ namespace Rector\BetterPhpDocParser\PhpDocNodeVisitor;
|
||||
|
||||
use PHPStan\PhpDocParser\Ast\Node;
|
||||
use Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey;
|
||||
use RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class ChangedPhpDocNodeVisitor extends \RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor
|
||||
use RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class ChangedPhpDocNodeVisitor extends \RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
|
@ -8,8 +8,8 @@ use PHPStan\PhpDocParser\Ast\Type\IntersectionTypeNode;
|
||||
use Rector\BetterPhpDocParser\Attributes\AttributeMirrorer;
|
||||
use Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface;
|
||||
use Rector\BetterPhpDocParser\ValueObject\Type\BracketsAwareIntersectionTypeNode;
|
||||
use RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class IntersectionTypeNodePhpDocNodeVisitor extends \RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||
use RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class IntersectionTypeNodePhpDocNodeVisitor extends \RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||
{
|
||||
/**
|
||||
* @var \Rector\BetterPhpDocParser\Attributes\AttributeMirrorer
|
||||
|
@ -8,8 +8,8 @@ use PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode;
|
||||
use Rector\BetterPhpDocParser\Attributes\AttributeMirrorer;
|
||||
use Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface;
|
||||
use Rector\BetterPhpDocParser\ValueObject\PhpDoc\VariadicAwareParamTagValueNode;
|
||||
use RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class ParamPhpDocNodeVisitor extends \RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||
use RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class ParamPhpDocNodeVisitor extends \RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||
{
|
||||
/**
|
||||
* @var \Rector\BetterPhpDocParser\Attributes\AttributeMirrorer
|
||||
|
@ -14,8 +14,8 @@ use Rector\BetterPhpDocParser\ValueObject\PhpDoc\SpacingAwareTemplateTagValueNod
|
||||
use Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey;
|
||||
use Rector\BetterPhpDocParser\ValueObject\StartAndEnd;
|
||||
use Rector\Core\Exception\ShouldNotHappenException;
|
||||
use RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class TemplatePhpDocNodeVisitor extends \RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||
use RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class TemplatePhpDocNodeVisitor extends \RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||
{
|
||||
/**
|
||||
* @var \Rector\BetterPhpDocParser\DataProvider\CurrentTokenIteratorProvider
|
||||
|
@ -14,8 +14,8 @@ use Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey;
|
||||
use Rector\BetterPhpDocParser\ValueObject\StartAndEnd;
|
||||
use Rector\BetterPhpDocParser\ValueObject\Type\BracketsAwareUnionTypeNode;
|
||||
use Rector\Core\Exception\ShouldNotHappenException;
|
||||
use RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class UnionTypeNodePhpDocNodeVisitor extends \RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||
use RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||
final class UnionTypeNodePhpDocNodeVisitor extends \RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||
{
|
||||
/**
|
||||
* @var \Rector\BetterPhpDocParser\DataProvider\CurrentTokenIteratorProvider
|
||||
|
@ -17,7 +17,7 @@ use Rector\BetterPhpDocParser\PhpDocInfo\TokenIteratorFactory;
|
||||
use Rector\BetterPhpDocParser\ValueObject\Parser\BetterTokenIterator;
|
||||
use Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey;
|
||||
use Rector\BetterPhpDocParser\ValueObject\StartAndEnd;
|
||||
use RectorPrefix20210521\Symplify\PackageBuilder\Reflection\PrivatesCaller;
|
||||
use RectorPrefix20210522\Symplify\PackageBuilder\Reflection\PrivatesCaller;
|
||||
/**
|
||||
* @see \Rector\Tests\BetterPhpDocParser\PhpDocParser\TagValueNodeReprint\TagValueNodeReprintTest
|
||||
*/
|
||||
@ -40,7 +40,7 @@ final class BetterPhpDocParser extends \PHPStan\PhpDocParser\Parser\PhpDocParser
|
||||
$this->tokenIteratorFactory = $tokenIteratorFactory;
|
||||
$this->doctrineAnnotationDecorator = $doctrineAnnotationDecorator;
|
||||
parent::__construct($typeParser, $constExprParser);
|
||||
$this->privatesCaller = new \RectorPrefix20210521\Symplify\PackageBuilder\Reflection\PrivatesCaller();
|
||||
$this->privatesCaller = new \RectorPrefix20210522\Symplify\PackageBuilder\Reflection\PrivatesCaller();
|
||||
}
|
||||
public function parse(\PHPStan\PhpDocParser\Parser\TokenIterator $tokenIterator) : \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode
|
||||
{
|
||||
|
@ -3,7 +3,7 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\BetterPhpDocParser\PhpDocParser;
|
||||
|
||||
use RectorPrefix20210521\Nette\Utils\Strings;
|
||||
use RectorPrefix20210522\Nette\Utils\Strings;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Stmt\Use_;
|
||||
use PhpParser\Node\Stmt\UseUse;
|
||||
@ -76,15 +76,15 @@ final class ClassAnnotationMatcher
|
||||
{
|
||||
$shortName = $useUse->alias !== null ? $useUse->alias->name : $useUse->name->getLast();
|
||||
$shortNamePattern = \preg_quote($shortName, '#');
|
||||
return (bool) \RectorPrefix20210521\Nette\Utils\Strings::match($tag, '#' . $shortNamePattern . '(\\\\[\\w]+)?#i');
|
||||
return (bool) \RectorPrefix20210522\Nette\Utils\Strings::match($tag, '#' . $shortNamePattern . '(\\\\[\\w]+)?#i');
|
||||
}
|
||||
private function resolveName(string $tag, \PhpParser\Node\Stmt\UseUse $useUse) : string
|
||||
{
|
||||
if ($useUse->alias === null) {
|
||||
return $useUse->name->toString();
|
||||
}
|
||||
$unaliasedShortClass = \RectorPrefix20210521\Nette\Utils\Strings::substring($tag, \RectorPrefix20210521\Nette\Utils\Strings::length($useUse->alias->toString()));
|
||||
if (\RectorPrefix20210521\Nette\Utils\Strings::startsWith($unaliasedShortClass, '\\')) {
|
||||
$unaliasedShortClass = \RectorPrefix20210522\Nette\Utils\Strings::substring($tag, \RectorPrefix20210522\Nette\Utils\Strings::length($useUse->alias->toString()));
|
||||
if (\RectorPrefix20210522\Nette\Utils\Strings::startsWith($unaliasedShortClass, '\\')) {
|
||||
return $useUse->name . $unaliasedShortClass;
|
||||
}
|
||||
return $useUse->name . '\\' . $unaliasedShortClass;
|
||||
|
@ -3,7 +3,7 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\BetterPhpDocParser\PhpDocParser;
|
||||
|
||||
use RectorPrefix20210521\Nette\Utils\Strings;
|
||||
use RectorPrefix20210522\Nette\Utils\Strings;
|
||||
use PhpParser\Node;
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\GenericTagValueNode;
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode;
|
||||
@ -129,7 +129,7 @@ final class DoctrineAnnotationDecorator
|
||||
// known doc tag to annotation class
|
||||
$fullyQualifiedAnnotationClass = $this->classAnnotationMatcher->resolveTagFullyQualifiedName($phpDocChildNode->name, $currentPhpNode);
|
||||
// not an annotations class
|
||||
if (!\RectorPrefix20210521\Nette\Utils\Strings::contains($fullyQualifiedAnnotationClass, '\\')) {
|
||||
if (!\RectorPrefix20210522\Nette\Utils\Strings::contains($fullyQualifiedAnnotationClass, '\\')) {
|
||||
continue;
|
||||
}
|
||||
$genericTagValueNode = $phpDocChildNode->value;
|
||||
@ -159,10 +159,10 @@ final class DoctrineAnnotationDecorator
|
||||
return \true;
|
||||
}
|
||||
do {
|
||||
if ($composedTokenIterator->isCurrentTokenTypes([\PHPStan\PhpDocParser\Lexer\Lexer::TOKEN_OPEN_CURLY_BRACKET, \PHPStan\PhpDocParser\Lexer\Lexer::TOKEN_OPEN_PARENTHESES]) || \RectorPrefix20210521\Nette\Utils\Strings::contains($composedTokenIterator->currentTokenValue(), '(')) {
|
||||
if ($composedTokenIterator->isCurrentTokenTypes([\PHPStan\PhpDocParser\Lexer\Lexer::TOKEN_OPEN_CURLY_BRACKET, \PHPStan\PhpDocParser\Lexer\Lexer::TOKEN_OPEN_PARENTHESES]) || \RectorPrefix20210522\Nette\Utils\Strings::contains($composedTokenIterator->currentTokenValue(), '(')) {
|
||||
++$openBracketCount;
|
||||
}
|
||||
if ($composedTokenIterator->isCurrentTokenTypes([\PHPStan\PhpDocParser\Lexer\Lexer::TOKEN_CLOSE_CURLY_BRACKET, \PHPStan\PhpDocParser\Lexer\Lexer::TOKEN_CLOSE_PARENTHESES]) || \RectorPrefix20210521\Nette\Utils\Strings::contains($composedTokenIterator->currentTokenValue(), ')')) {
|
||||
if ($composedTokenIterator->isCurrentTokenTypes([\PHPStan\PhpDocParser\Lexer\Lexer::TOKEN_CLOSE_CURLY_BRACKET, \PHPStan\PhpDocParser\Lexer\Lexer::TOKEN_CLOSE_PARENTHESES]) || \RectorPrefix20210522\Nette\Utils\Strings::contains($composedTokenIterator->currentTokenValue(), ')')) {
|
||||
++$closeBracketCount;
|
||||
}
|
||||
$composedTokenIterator->next();
|
||||
|
@ -3,7 +3,7 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\BetterPhpDocParser\Printer;
|
||||
|
||||
use RectorPrefix20210521\Nette\Utils\Strings;
|
||||
use RectorPrefix20210522\Nette\Utils\Strings;
|
||||
final class DocBlockInliner
|
||||
{
|
||||
/**
|
||||
@ -18,7 +18,7 @@ final class DocBlockInliner
|
||||
private const NEWLINE_MIDDLE_DOC_REGEX = "#\n \\* #";
|
||||
public function inline(string $docContent) : string
|
||||
{
|
||||
$docContent = \RectorPrefix20210521\Nette\Utils\Strings::replace($docContent, self::NEWLINE_MIDDLE_DOC_REGEX, ' ');
|
||||
return \RectorPrefix20210521\Nette\Utils\Strings::replace($docContent, self::NEWLINE_CLOSING_DOC_REGEX, ' */');
|
||||
$docContent = \RectorPrefix20210522\Nette\Utils\Strings::replace($docContent, self::NEWLINE_MIDDLE_DOC_REGEX, ' ');
|
||||
return \RectorPrefix20210522\Nette\Utils\Strings::replace($docContent, self::NEWLINE_CLOSING_DOC_REGEX, ' */');
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\BetterPhpDocParser\Printer;
|
||||
|
||||
use RectorPrefix20210521\Nette\Utils\Strings;
|
||||
use RectorPrefix20210522\Nette\Utils\Strings;
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode;
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocChildNode;
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode;
|
||||
@ -20,7 +20,7 @@ use Rector\BetterPhpDocParser\PhpDocNodeVisitor\ChangedPhpDocNodeVisitor;
|
||||
use Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey;
|
||||
use Rector\BetterPhpDocParser\ValueObject\StartAndEnd;
|
||||
use Rector\Core\Exception\ShouldNotHappenException;
|
||||
use RectorPrefix20210521\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
||||
use RectorPrefix20210522\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
||||
/**
|
||||
* @see \Rector\Tests\BetterPhpDocParser\PhpDocInfo\PhpDocInfoPrinter\PhpDocInfoPrinterTest
|
||||
*/
|
||||
@ -133,7 +133,7 @@ final class PhpDocInfoPrinter
|
||||
$this->currentTokenPosition = 0;
|
||||
$phpDocString = $this->printPhpDocNode($phpDocNode);
|
||||
// hotfix of extra space with callable ()
|
||||
return \RectorPrefix20210521\Nette\Utils\Strings::replace($phpDocString, self::CALLABLE_REGEX, 'callable(');
|
||||
return \RectorPrefix20210522\Nette\Utils\Strings::replace($phpDocString, self::CALLABLE_REGEX, 'callable(');
|
||||
}
|
||||
public function getCurrentPhpDocInfo() : \Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo
|
||||
{
|
||||
@ -156,11 +156,11 @@ final class PhpDocInfoPrinter
|
||||
}
|
||||
$output = $this->printEnd($output);
|
||||
// fix missing start
|
||||
if (!\RectorPrefix20210521\Nette\Utils\Strings::match($output, self::DOCBLOCK_START_REGEX) && $output) {
|
||||
if (!\RectorPrefix20210522\Nette\Utils\Strings::match($output, self::DOCBLOCK_START_REGEX) && $output) {
|
||||
$output = '/**' . $output;
|
||||
}
|
||||
// fix missing end
|
||||
if (\RectorPrefix20210521\Nette\Utils\Strings::match($output, self::OPENING_DOCBLOCK_REGEX) && $output && !\RectorPrefix20210521\Nette\Utils\Strings::match($output, self::CLOSING_DOCBLOCK_REGEX)) {
|
||||
if (\RectorPrefix20210522\Nette\Utils\Strings::match($output, self::OPENING_DOCBLOCK_REGEX) && $output && !\RectorPrefix20210522\Nette\Utils\Strings::match($output, self::CLOSING_DOCBLOCK_REGEX)) {
|
||||
$output .= ' */';
|
||||
}
|
||||
return $output;
|
||||
@ -182,7 +182,7 @@ final class PhpDocInfoPrinter
|
||||
if ($phpDocChildNode->value instanceof \Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode && $shouldReprintChildNode) {
|
||||
$printedNode = (string) $phpDocChildNode;
|
||||
// remove extra space between tags
|
||||
$printedNode = \RectorPrefix20210521\Nette\Utils\Strings::replace($printedNode, self::TAG_AND_SPACE_REGEX, '$1(');
|
||||
$printedNode = \RectorPrefix20210522\Nette\Utils\Strings::replace($printedNode, self::TAG_AND_SPACE_REGEX, '$1(');
|
||||
return self::NEWLINE_WITH_ASTERISK . $printedNode;
|
||||
}
|
||||
}
|
||||
@ -223,7 +223,7 @@ final class PhpDocInfoPrinter
|
||||
--$from;
|
||||
}
|
||||
// skip extra empty lines above if this is the last one
|
||||
if ($shouldSkipEmptyLinesAbove && \RectorPrefix20210521\Nette\Utils\Strings::contains($this->tokens[$from][0], \PHP_EOL) && \RectorPrefix20210521\Nette\Utils\Strings::contains($this->tokens[$from + 1][0], \PHP_EOL)) {
|
||||
if ($shouldSkipEmptyLinesAbove && \RectorPrefix20210522\Nette\Utils\Strings::contains($this->tokens[$from][0], \PHP_EOL) && \RectorPrefix20210522\Nette\Utils\Strings::contains($this->tokens[$from + 1][0], \PHP_EOL)) {
|
||||
++$from;
|
||||
}
|
||||
return $this->appendToOutput($output, $from, $to, $positionJumpSet);
|
||||
|
@ -5,7 +5,7 @@ namespace Rector\BetterPhpDocParser\ValueObject\Parser;
|
||||
|
||||
use PHPStan\PhpDocParser\Parser\TokenIterator;
|
||||
use Rector\Core\Exception\ShouldNotHappenException;
|
||||
use RectorPrefix20210521\Symplify\PackageBuilder\Reflection\PrivatesAccessor;
|
||||
use RectorPrefix20210522\Symplify\PackageBuilder\Reflection\PrivatesAccessor;
|
||||
final class BetterTokenIterator extends \PHPStan\PhpDocParser\Parser\TokenIterator
|
||||
{
|
||||
/**
|
||||
@ -25,7 +25,7 @@ final class BetterTokenIterator extends \PHPStan\PhpDocParser\Parser\TokenIterat
|
||||
*/
|
||||
public function __construct(array $tokens, int $index = 0)
|
||||
{
|
||||
$this->privatesAccessor = new \RectorPrefix20210521\Symplify\PackageBuilder\Reflection\PrivatesAccessor();
|
||||
$this->privatesAccessor = new \RectorPrefix20210522\Symplify\PackageBuilder\Reflection\PrivatesAccessor();
|
||||
if ($tokens === []) {
|
||||
$this->privatesAccessor->setPrivateProperty($this, self::TOKENS, []);
|
||||
$this->privatesAccessor->setPrivateProperty($this, self::INDEX, 0);
|
||||
|
@ -3,7 +3,7 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\BetterPhpDocParser\ValueObject\PhpDoc\DoctrineAnnotation;
|
||||
|
||||
use RectorPrefix20210521\Nette\Utils\Strings;
|
||||
use RectorPrefix20210522\Nette\Utils\Strings;
|
||||
use PHPStan\PhpDocParser\Ast\Node;
|
||||
use PHPStan\PhpDocParser\Ast\NodeAttributes;
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode;
|
||||
@ -79,7 +79,7 @@ abstract class AbstractValuesAwareNode implements \PHPStan\PhpDocParser\Ast\PhpD
|
||||
{
|
||||
// is quoted?
|
||||
if (isset($this->values[$key])) {
|
||||
$isQuoted = (bool) \RectorPrefix20210521\Nette\Utils\Strings::match($this->values[$key], self::UNQUOTED_VALUE_REGEX);
|
||||
$isQuoted = (bool) \RectorPrefix20210522\Nette\Utils\Strings::match($this->values[$key], self::UNQUOTED_VALUE_REGEX);
|
||||
if ($isQuoted) {
|
||||
$value = '"' . $value . '"';
|
||||
}
|
||||
@ -106,7 +106,7 @@ abstract class AbstractValuesAwareNode implements \PHPStan\PhpDocParser\Ast\PhpD
|
||||
public function changeSilentValue($value) : void
|
||||
{
|
||||
// is quoted?
|
||||
$isQuoted = (bool) \RectorPrefix20210521\Nette\Utils\Strings::match($this->values[0], self::UNQUOTED_VALUE_REGEX);
|
||||
$isQuoted = (bool) \RectorPrefix20210522\Nette\Utils\Strings::match($this->values[0], self::UNQUOTED_VALUE_REGEX);
|
||||
if ($isQuoted) {
|
||||
$value = '"' . $value . '"';
|
||||
}
|
||||
@ -152,7 +152,7 @@ abstract class AbstractValuesAwareNode implements \PHPStan\PhpDocParser\Ast\PhpD
|
||||
if (!\is_string($value)) {
|
||||
return $value;
|
||||
}
|
||||
$matches = \RectorPrefix20210521\Nette\Utils\Strings::match($value, self::UNQUOTED_VALUE_REGEX);
|
||||
$matches = \RectorPrefix20210522\Nette\Utils\Strings::match($value, self::UNQUOTED_VALUE_REGEX);
|
||||
if ($matches === null) {
|
||||
return $value;
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\BetterPhpDocParser\ValueObject;
|
||||
|
||||
use RectorPrefix20210521\Symplify\SimplePhpDocParser\ValueObject\PhpDocAttributeKey as NativePhpDocAttributeKey;
|
||||
use RectorPrefix20210522\Symplify\SimplePhpDocParser\ValueObject\PhpDocAttributeKey as NativePhpDocAttributeKey;
|
||||
final class PhpDocAttributeKey
|
||||
{
|
||||
/**
|
||||
@ -13,7 +13,7 @@ final class PhpDocAttributeKey
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PARENT = \RectorPrefix20210521\Symplify\SimplePhpDocParser\ValueObject\PhpDocAttributeKey::PARENT;
|
||||
public const PARENT = \RectorPrefix20210522\Symplify\SimplePhpDocParser\ValueObject\PhpDocAttributeKey::PARENT;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
@ -21,5 +21,5 @@ final class PhpDocAttributeKey
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const ORIG_NODE = \RectorPrefix20210521\Symplify\SimplePhpDocParser\ValueObject\PhpDocAttributeKey::ORIG_NODE;
|
||||
public const ORIG_NODE = \RectorPrefix20210522\Symplify\SimplePhpDocParser\ValueObject\PhpDocAttributeKey::ORIG_NODE;
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\BetterPhpDocParser\ValueObject\Type;
|
||||
|
||||
use RectorPrefix20210521\Nette\Utils\Strings;
|
||||
use RectorPrefix20210522\Nette\Utils\Strings;
|
||||
use PHPStan\PhpDocParser\Ast\NodeAttributes;
|
||||
use PHPStan\PhpDocParser\Ast\Type\CallableTypeNode;
|
||||
use PHPStan\PhpDocParser\Ast\Type\GenericTypeNode;
|
||||
@ -22,7 +22,7 @@ final class SpacingAwareCallableTypeNode extends \PHPStan\PhpDocParser\Ast\Type\
|
||||
$returnType = $this->returnType;
|
||||
$parameterTypeString = $this->createParameterTypeString();
|
||||
$returnTypeAsString = (string) $returnType;
|
||||
if (\RectorPrefix20210521\Nette\Utils\Strings::contains($returnTypeAsString, '|')) {
|
||||
if (\RectorPrefix20210522\Nette\Utils\Strings::contains($returnTypeAsString, '|')) {
|
||||
$returnTypeAsString = '(' . $returnTypeAsString . ')';
|
||||
}
|
||||
$parameterTypeString = $this->normalizeParameterType($parameterTypeString, $returnTypeAsString);
|
||||
|
@ -3,11 +3,11 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Caching\Cache;
|
||||
|
||||
use RectorPrefix20210521\Nette\Caching\Cache;
|
||||
use RectorPrefix20210521\Nette\Caching\Storages\FileStorage;
|
||||
use RectorPrefix20210522\Nette\Caching\Cache;
|
||||
use RectorPrefix20210522\Nette\Caching\Storages\FileStorage;
|
||||
use Rector\Core\Configuration\Option;
|
||||
use RectorPrefix20210521\Symplify\PackageBuilder\Parameter\ParameterProvider;
|
||||
use RectorPrefix20210521\Symplify\SmartFileSystem\SmartFileSystem;
|
||||
use RectorPrefix20210522\Symplify\PackageBuilder\Parameter\ParameterProvider;
|
||||
use RectorPrefix20210522\Symplify\SmartFileSystem\SmartFileSystem;
|
||||
final class NetteCacheFactory
|
||||
{
|
||||
/**
|
||||
@ -18,20 +18,20 @@ final class NetteCacheFactory
|
||||
* @var \Symplify\SmartFileSystem\SmartFileSystem
|
||||
*/
|
||||
private $smartFileSystem;
|
||||
public function __construct(\RectorPrefix20210521\Symplify\PackageBuilder\Parameter\ParameterProvider $parameterProvider, \RectorPrefix20210521\Symplify\SmartFileSystem\SmartFileSystem $smartFileSystem)
|
||||
public function __construct(\RectorPrefix20210522\Symplify\PackageBuilder\Parameter\ParameterProvider $parameterProvider, \RectorPrefix20210522\Symplify\SmartFileSystem\SmartFileSystem $smartFileSystem)
|
||||
{
|
||||
$this->parameterProvider = $parameterProvider;
|
||||
$this->smartFileSystem = $smartFileSystem;
|
||||
}
|
||||
public function create() : \RectorPrefix20210521\Nette\Caching\Cache
|
||||
public function create() : \RectorPrefix20210522\Nette\Caching\Cache
|
||||
{
|
||||
$cacheDirectory = $this->parameterProvider->provideStringParameter(\Rector\Core\Configuration\Option::CACHE_DIR);
|
||||
// ensure cache directory exists
|
||||
if (!$this->smartFileSystem->exists($cacheDirectory)) {
|
||||
$this->smartFileSystem->mkdir($cacheDirectory);
|
||||
}
|
||||
$fileStorage = new \RectorPrefix20210521\Nette\Caching\Storages\FileStorage($cacheDirectory);
|
||||
$fileStorage = new \RectorPrefix20210522\Nette\Caching\Storages\FileStorage($cacheDirectory);
|
||||
// namespace is unique per project
|
||||
return new \RectorPrefix20210521\Nette\Caching\Cache($fileStorage, \getcwd());
|
||||
return new \RectorPrefix20210522\Nette\Caching\Cache($fileStorage, \getcwd());
|
||||
}
|
||||
}
|
||||
|
@ -4,12 +4,12 @@ declare (strict_types=1);
|
||||
namespace Rector\Caching\Config;
|
||||
|
||||
use Rector\Core\Exception\ShouldNotHappenException;
|
||||
use RectorPrefix20210521\Symfony\Component\Config\FileLocator;
|
||||
use RectorPrefix20210521\Symfony\Component\Config\Loader\LoaderInterface;
|
||||
use RectorPrefix20210521\Symfony\Component\Config\Loader\LoaderResolver;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\GlobFileLoader;
|
||||
use RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
|
||||
use RectorPrefix20210522\Symfony\Component\Config\FileLocator;
|
||||
use RectorPrefix20210522\Symfony\Component\Config\Loader\LoaderInterface;
|
||||
use RectorPrefix20210522\Symfony\Component\Config\Loader\LoaderResolver;
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\GlobFileLoader;
|
||||
use RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
|
||||
use Symplify\SmartFileSystem\SmartFileInfo;
|
||||
/**
|
||||
* Inspired by https://github.com/symplify/easy-coding-standard/blob/e598ab54686e416788f28fcfe007fd08e0f371d9/packages/changed-files-detector/src/FileHashComputer.php
|
||||
@ -20,7 +20,7 @@ final class FileHashComputer
|
||||
public function compute(\Symplify\SmartFileSystem\SmartFileInfo $fileInfo) : string
|
||||
{
|
||||
$this->ensureIsPhp($fileInfo);
|
||||
$containerBuilder = new \RectorPrefix20210521\Symfony\Component\DependencyInjection\ContainerBuilder();
|
||||
$containerBuilder = new \RectorPrefix20210522\Symfony\Component\DependencyInjection\ContainerBuilder();
|
||||
$fileLoader = $this->createFileLoader($fileInfo, $containerBuilder);
|
||||
$fileLoader->load($fileInfo->getRealPath());
|
||||
$parameterBag = $containerBuilder->getParameterBag();
|
||||
@ -37,11 +37,11 @@ final class FileHashComputer
|
||||
$fileInfo->getRelativeFilePath()
|
||||
));
|
||||
}
|
||||
private function createFileLoader(\Symplify\SmartFileSystem\SmartFileInfo $fileInfo, \RectorPrefix20210521\Symfony\Component\DependencyInjection\ContainerBuilder $containerBuilder) : \RectorPrefix20210521\Symfony\Component\Config\Loader\LoaderInterface
|
||||
private function createFileLoader(\Symplify\SmartFileSystem\SmartFileInfo $fileInfo, \RectorPrefix20210522\Symfony\Component\DependencyInjection\ContainerBuilder $containerBuilder) : \RectorPrefix20210522\Symfony\Component\Config\Loader\LoaderInterface
|
||||
{
|
||||
$fileLocator = new \RectorPrefix20210521\Symfony\Component\Config\FileLocator([$fileInfo->getPath()]);
|
||||
$fileLoaders = [new \RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\GlobFileLoader($containerBuilder, $fileLocator), new \RectorPrefix20210521\Symfony\Component\DependencyInjection\Loader\PhpFileLoader($containerBuilder, $fileLocator)];
|
||||
$loaderResolver = new \RectorPrefix20210521\Symfony\Component\Config\Loader\LoaderResolver($fileLoaders);
|
||||
$fileLocator = new \RectorPrefix20210522\Symfony\Component\Config\FileLocator([$fileInfo->getPath()]);
|
||||
$fileLoaders = [new \RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\GlobFileLoader($containerBuilder, $fileLocator), new \RectorPrefix20210522\Symfony\Component\DependencyInjection\Loader\PhpFileLoader($containerBuilder, $fileLocator)];
|
||||
$loaderResolver = new \RectorPrefix20210522\Symfony\Component\Config\Loader\LoaderResolver($fileLoaders);
|
||||
$loader = $loaderResolver->resolve($fileInfo->getRealPath());
|
||||
if (!$loader) {
|
||||
throw new \Rector\Core\Exception\ShouldNotHappenException();
|
||||
|
@ -3,8 +3,8 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Caching\Detector;
|
||||
|
||||
use RectorPrefix20210521\Nette\Caching\Cache;
|
||||
use RectorPrefix20210521\Nette\Utils\Strings;
|
||||
use RectorPrefix20210522\Nette\Caching\Cache;
|
||||
use RectorPrefix20210522\Nette\Utils\Strings;
|
||||
use Rector\Caching\Config\FileHashComputer;
|
||||
use Symplify\SmartFileSystem\SmartFileInfo;
|
||||
/**
|
||||
@ -25,7 +25,7 @@ final class ChangedFilesDetector
|
||||
* @var \Nette\Caching\Cache
|
||||
*/
|
||||
private $cache;
|
||||
public function __construct(\Rector\Caching\Config\FileHashComputer $fileHashComputer, \RectorPrefix20210521\Nette\Caching\Cache $cache)
|
||||
public function __construct(\Rector\Caching\Config\FileHashComputer $fileHashComputer, \RectorPrefix20210522\Nette\Caching\Cache $cache)
|
||||
{
|
||||
$this->fileHashComputer = $fileHashComputer;
|
||||
$this->cache = $cache;
|
||||
@ -54,7 +54,7 @@ final class ChangedFilesDetector
|
||||
}
|
||||
public function clear() : void
|
||||
{
|
||||
$this->cache->clean([\RectorPrefix20210521\Nette\Caching\Cache::ALL => \true]);
|
||||
$this->cache->clean([\RectorPrefix20210522\Nette\Caching\Cache::ALL => \true]);
|
||||
}
|
||||
/**
|
||||
* @return SmartFileInfo[]
|
||||
@ -95,7 +95,7 @@ final class ChangedFilesDetector
|
||||
}
|
||||
private function storeConfigurationDataHash(\Symplify\SmartFileSystem\SmartFileInfo $fileInfo, string $configurationHash) : void
|
||||
{
|
||||
$key = self::CONFIGURATION_HASH_KEY . '_' . \RectorPrefix20210521\Nette\Utils\Strings::webalize($fileInfo->getRealPath());
|
||||
$key = self::CONFIGURATION_HASH_KEY . '_' . \RectorPrefix20210522\Nette\Utils\Strings::webalize($fileInfo->getRealPath());
|
||||
$this->invalidateCacheIfConfigurationChanged($key, $configurationHash);
|
||||
$this->cache->save($key, $configurationHash);
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ use PHPStan\Analyser\MutatingScope;
|
||||
use PHPStan\Analyser\NodeScopeResolver;
|
||||
use PHPStan\Dependency\DependencyResolver as PHPStanDependencyResolver;
|
||||
use PHPStan\File\FileHelper;
|
||||
use RectorPrefix20210521\Symplify\PackageBuilder\Reflection\PrivatesAccessor;
|
||||
use RectorPrefix20210522\Symplify\PackageBuilder\Reflection\PrivatesAccessor;
|
||||
final class DependencyResolver
|
||||
{
|
||||
/**
|
||||
@ -27,7 +27,7 @@ final class DependencyResolver
|
||||
* @var \Symplify\PackageBuilder\Reflection\PrivatesAccessor
|
||||
*/
|
||||
private $privatesAccessor;
|
||||
public function __construct(\PHPStan\Analyser\NodeScopeResolver $nodeScopeResolver, \PHPStan\Dependency\DependencyResolver $phpStanDependencyResolver, \PHPStan\File\FileHelper $fileHelper, \RectorPrefix20210521\Symplify\PackageBuilder\Reflection\PrivatesAccessor $privatesAccessor)
|
||||
public function __construct(\PHPStan\Analyser\NodeScopeResolver $nodeScopeResolver, \PHPStan\Dependency\DependencyResolver $phpStanDependencyResolver, \PHPStan\File\FileHelper $fileHelper, \RectorPrefix20210522\Symplify\PackageBuilder\Reflection\PrivatesAccessor $privatesAccessor)
|
||||
{
|
||||
$this->nodeScopeResolver = $nodeScopeResolver;
|
||||
$this->phpStanDependencyResolver = $phpStanDependencyResolver;
|
||||
|
@ -3,7 +3,7 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\ChangesReporting\Annotation;
|
||||
|
||||
use RectorPrefix20210521\Nette\Utils\Strings;
|
||||
use RectorPrefix20210522\Nette\Utils\Strings;
|
||||
use Rector\Core\Contract\Rector\RectorInterface;
|
||||
use ReflectionClass;
|
||||
/**
|
||||
@ -23,7 +23,7 @@ final class AnnotationExtractor
|
||||
}
|
||||
// @see https://regex101.com/r/oYGaWU/1
|
||||
$pattern = '#' . \preg_quote($annotation, '#') . '\\s+(?<content>.*?)$#m';
|
||||
$matches = \RectorPrefix20210521\Nette\Utils\Strings::match($docComment, $pattern);
|
||||
$matches = \RectorPrefix20210522\Nette\Utils\Strings::match($docComment, $pattern);
|
||||
return $matches['content'] ?? null;
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\ChangesReporting\Output;
|
||||
|
||||
use RectorPrefix20210521\Nette\Utils\Strings;
|
||||
use RectorPrefix20210522\Nette\Utils\Strings;
|
||||
use Rector\ChangesReporting\Annotation\RectorsChangelogResolver;
|
||||
use Rector\ChangesReporting\Contract\Output\OutputFormatterInterface;
|
||||
use Rector\Core\Configuration\Configuration;
|
||||
@ -119,8 +119,8 @@ final class ConsoleOutputFormatter implements \Rector\ChangesReporting\Contract\
|
||||
private function normalizePathsToRelativeWithLine(string $errorMessage) : string
|
||||
{
|
||||
$regex = '#' . \preg_quote(\getcwd(), '#') . '/#';
|
||||
$errorMessage = \RectorPrefix20210521\Nette\Utils\Strings::replace($errorMessage, $regex, '');
|
||||
return \RectorPrefix20210521\Nette\Utils\Strings::replace($errorMessage, self::ON_LINE_REGEX, ':');
|
||||
$errorMessage = \RectorPrefix20210522\Nette\Utils\Strings::replace($errorMessage, $regex, '');
|
||||
return \RectorPrefix20210522\Nette\Utils\Strings::replace($errorMessage, self::ON_LINE_REGEX, ':');
|
||||
}
|
||||
private function reportRemovedNodes(\Rector\Core\ValueObject\ProcessResult $processResult) : void
|
||||
{
|
||||
@ -146,7 +146,7 @@ final class ConsoleOutputFormatter implements \Rector\ChangesReporting\Contract\
|
||||
$rectorsChangelogs = $this->rectorsChangelogResolver->resolveIncludingMissing($fileDiff->getRectorClasses());
|
||||
$rectorsChangelogsLines = [];
|
||||
foreach ($rectorsChangelogs as $rectorClass => $changelog) {
|
||||
$rectorShortClass = (string) \RectorPrefix20210521\Nette\Utils\Strings::after($rectorClass, '\\', -1);
|
||||
$rectorShortClass = (string) \RectorPrefix20210522\Nette\Utils\Strings::after($rectorClass, '\\', -1);
|
||||
$rectorsChangelogsLines[] = $changelog === null ? $rectorShortClass : $rectorShortClass . ' (' . $changelog . ')';
|
||||
}
|
||||
return $rectorsChangelogsLines;
|
||||
|
@ -3,12 +3,12 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\ChangesReporting\Output;
|
||||
|
||||
use RectorPrefix20210521\Nette\Utils\Json;
|
||||
use RectorPrefix20210522\Nette\Utils\Json;
|
||||
use Rector\ChangesReporting\Annotation\RectorsChangelogResolver;
|
||||
use Rector\ChangesReporting\Contract\Output\OutputFormatterInterface;
|
||||
use Rector\Core\Configuration\Configuration;
|
||||
use Rector\Core\ValueObject\ProcessResult;
|
||||
use RectorPrefix20210521\Symplify\SmartFileSystem\SmartFileSystem;
|
||||
use RectorPrefix20210522\Symplify\SmartFileSystem\SmartFileSystem;
|
||||
final class JsonOutputFormatter implements \Rector\ChangesReporting\Contract\Output\OutputFormatterInterface
|
||||
{
|
||||
/**
|
||||
@ -27,7 +27,7 @@ final class JsonOutputFormatter implements \Rector\ChangesReporting\Contract\Out
|
||||
* @var \Rector\ChangesReporting\Annotation\RectorsChangelogResolver
|
||||
*/
|
||||
private $rectorsChangelogResolver;
|
||||
public function __construct(\Rector\Core\Configuration\Configuration $configuration, \RectorPrefix20210521\Symplify\SmartFileSystem\SmartFileSystem $smartFileSystem, \Rector\ChangesReporting\Annotation\RectorsChangelogResolver $rectorsChangelogResolver)
|
||||
public function __construct(\Rector\Core\Configuration\Configuration $configuration, \RectorPrefix20210522\Symplify\SmartFileSystem\SmartFileSystem $smartFileSystem, \Rector\ChangesReporting\Annotation\RectorsChangelogResolver $rectorsChangelogResolver)
|
||||
{
|
||||
$this->configuration = $configuration;
|
||||
$this->smartFileSystem = $smartFileSystem;
|
||||
@ -55,7 +55,7 @@ final class JsonOutputFormatter implements \Rector\ChangesReporting\Contract\Out
|
||||
if ($errorsData !== []) {
|
||||
$errorsArray['errors'] = $errorsData;
|
||||
}
|
||||
$json = \RectorPrefix20210521\Nette\Utils\Json::encode($errorsArray, \RectorPrefix20210521\Nette\Utils\Json::PRETTY);
|
||||
$json = \RectorPrefix20210522\Nette\Utils\Json::encode($errorsArray, \RectorPrefix20210522\Nette\Utils\Json::PRETTY);
|
||||
$outputFile = $this->configuration->getOutputFile();
|
||||
if ($outputFile !== null) {
|
||||
$this->smartFileSystem->dumpFile($outputFile, $json . \PHP_EOL);
|
||||
|
@ -6,7 +6,7 @@ namespace Rector\ChangesReporting\ValueObjectFactory;
|
||||
use Rector\Core\Differ\DefaultDiffer;
|
||||
use Rector\Core\ValueObject\Application\File;
|
||||
use Rector\Core\ValueObject\Reporting\FileDiff;
|
||||
use RectorPrefix20210521\Symplify\ConsoleColorDiff\Console\Output\ConsoleDiffer;
|
||||
use RectorPrefix20210522\Symplify\ConsoleColorDiff\Console\Output\ConsoleDiffer;
|
||||
final class FileDiffFactory
|
||||
{
|
||||
/**
|
||||
@ -17,7 +17,7 @@ final class FileDiffFactory
|
||||
* @var \Symplify\ConsoleColorDiff\Console\Output\ConsoleDiffer
|
||||
*/
|
||||
private $consoleDiffer;
|
||||
public function __construct(\Rector\Core\Differ\DefaultDiffer $defaultDiffer, \RectorPrefix20210521\Symplify\ConsoleColorDiff\Console\Output\ConsoleDiffer $consoleDiffer)
|
||||
public function __construct(\Rector\Core\Differ\DefaultDiffer $defaultDiffer, \RectorPrefix20210522\Symplify\ConsoleColorDiff\Console\Output\ConsoleDiffer $consoleDiffer)
|
||||
{
|
||||
$this->defaultDiffer = $defaultDiffer;
|
||||
$this->consoleDiffer = $consoleDiffer;
|
||||
|
@ -5,7 +5,7 @@ namespace Rector\FamilyTree\Reflection;
|
||||
|
||||
use PHPStan\Reflection\ClassReflection;
|
||||
use PHPStan\Reflection\ReflectionProvider;
|
||||
use RectorPrefix20210521\Symplify\PackageBuilder\Reflection\PrivatesAccessor;
|
||||
use RectorPrefix20210522\Symplify\PackageBuilder\Reflection\PrivatesAccessor;
|
||||
final class FamilyRelationsAnalyzer
|
||||
{
|
||||
/**
|
||||
@ -16,7 +16,7 @@ final class FamilyRelationsAnalyzer
|
||||
* @var \Symplify\PackageBuilder\Reflection\PrivatesAccessor
|
||||
*/
|
||||
private $privatesAccessor;
|
||||
public function __construct(\PHPStan\Reflection\ReflectionProvider $reflectionProvider, \RectorPrefix20210521\Symplify\PackageBuilder\Reflection\PrivatesAccessor $privatesAccessor)
|
||||
public function __construct(\PHPStan\Reflection\ReflectionProvider $reflectionProvider, \RectorPrefix20210522\Symplify\PackageBuilder\Reflection\PrivatesAccessor $privatesAccessor)
|
||||
{
|
||||
$this->reflectionProvider = $reflectionProvider;
|
||||
$this->privatesAccessor = $privatesAccessor;
|
||||
|
@ -3,7 +3,7 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\FileFormatter\EditorConfig;
|
||||
|
||||
use RectorPrefix20210521\Idiosyncratic\EditorConfig\EditorConfig;
|
||||
use RectorPrefix20210522\Idiosyncratic\EditorConfig\EditorConfig;
|
||||
use Rector\Core\ValueObject\Application\File;
|
||||
use Rector\FileFormatter\ValueObject\EditorConfigConfiguration;
|
||||
use Rector\FileFormatter\ValueObject\EditorConfigOption;
|
||||
@ -17,7 +17,7 @@ final class EditorConfigParser
|
||||
* @var \Idiosyncratic\EditorConfig\EditorConfig
|
||||
*/
|
||||
private $editorConfig;
|
||||
public function __construct(\RectorPrefix20210521\Idiosyncratic\EditorConfig\EditorConfig $editorConfig)
|
||||
public function __construct(\RectorPrefix20210522\Idiosyncratic\EditorConfig\EditorConfig $editorConfig)
|
||||
{
|
||||
$this->editorConfig = $editorConfig;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ use Rector\FileFormatter\ValueObject\EditorConfigConfiguration;
|
||||
use Rector\FileFormatter\ValueObject\Indent;
|
||||
use Rector\FileFormatter\ValueObject\NewLine;
|
||||
use Rector\FileFormatter\ValueObjectFactory\EditorConfigConfigurationBuilder;
|
||||
use RectorPrefix20210521\Symplify\PackageBuilder\Parameter\ParameterProvider;
|
||||
use RectorPrefix20210522\Symplify\PackageBuilder\Parameter\ParameterProvider;
|
||||
final class FileFormatter
|
||||
{
|
||||
/**
|
||||
@ -31,7 +31,7 @@ final class FileFormatter
|
||||
/**
|
||||
* @param FileFormatterInterface[] $fileFormatters
|
||||
*/
|
||||
public function __construct(\Rector\FileFormatter\EditorConfig\EditorConfigParser $editorConfigParser, \RectorPrefix20210521\Symplify\PackageBuilder\Parameter\ParameterProvider $parameterProvider, array $fileFormatters = [])
|
||||
public function __construct(\Rector\FileFormatter\EditorConfig\EditorConfigParser $editorConfigParser, \RectorPrefix20210522\Symplify\PackageBuilder\Parameter\ParameterProvider $parameterProvider, array $fileFormatters = [])
|
||||
{
|
||||
$this->editorConfigParser = $editorConfigParser;
|
||||
$this->parameterProvider = $parameterProvider;
|
||||
|
@ -3,7 +3,7 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\FileFormatter\Formatter;
|
||||
|
||||
use RectorPrefix20210521\Ergebnis\Json\Printer\PrinterInterface;
|
||||
use RectorPrefix20210522\Ergebnis\Json\Printer\PrinterInterface;
|
||||
use Rector\Core\ValueObject\Application\File;
|
||||
use Rector\FileFormatter\Contract\Formatter\FileFormatterInterface;
|
||||
use Rector\FileFormatter\ValueObject\EditorConfigConfiguration;
|
||||
@ -18,7 +18,7 @@ final class JsonFileFormatter implements \Rector\FileFormatter\Contract\Formatte
|
||||
* @var \Ergebnis\Json\Printer\PrinterInterface
|
||||
*/
|
||||
private $jsonPrinter;
|
||||
public function __construct(\RectorPrefix20210521\Ergebnis\Json\Printer\PrinterInterface $jsonPrinter)
|
||||
public function __construct(\RectorPrefix20210522\Ergebnis\Json\Printer\PrinterInterface $jsonPrinter)
|
||||
{
|
||||
$this->jsonPrinter = $jsonPrinter;
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\FileFormatter\Formatter;
|
||||
|
||||
use RectorPrefix20210521\Nette\Utils\Strings;
|
||||
use RectorPrefix20210522\Nette\Utils\Strings;
|
||||
use Rector\Core\ValueObject\Application\File;
|
||||
use Rector\FileFormatter\Contract\Formatter\FileFormatterInterface;
|
||||
use Rector\FileFormatter\ValueObject\EditorConfigConfiguration;
|
||||
@ -82,7 +82,7 @@ final class XmlFileFormatter implements \Rector\FileFormatter\Contract\Formatter
|
||||
*/
|
||||
private function getXmlParts(string $xml) : array
|
||||
{
|
||||
$withNewLines = \RectorPrefix20210521\Nette\Utils\Strings::replace(\trim($xml), self::XML_PARTS_REGEX, "\$1\n\$2\$3");
|
||||
$withNewLines = \RectorPrefix20210522\Nette\Utils\Strings::replace(\trim($xml), self::XML_PARTS_REGEX, "\$1\n\$2\$3");
|
||||
return \explode("\n", $withNewLines);
|
||||
}
|
||||
private function getOutputForPart(string $part) : string
|
||||
@ -122,18 +122,18 @@ final class XmlFileFormatter implements \Rector\FileFormatter\Contract\Formatter
|
||||
}
|
||||
private function isOpeningTag(string $part) : bool
|
||||
{
|
||||
return (bool) \RectorPrefix20210521\Nette\Utils\Strings::match($part, self::IS_OPENING_TAG_REGEX);
|
||||
return (bool) \RectorPrefix20210522\Nette\Utils\Strings::match($part, self::IS_OPENING_TAG_REGEX);
|
||||
}
|
||||
private function isClosingTag(string $part) : bool
|
||||
{
|
||||
return (bool) \RectorPrefix20210521\Nette\Utils\Strings::match($part, self::IS_CLOSING_TAG_REGEX);
|
||||
return (bool) \RectorPrefix20210522\Nette\Utils\Strings::match($part, self::IS_CLOSING_TAG_REGEX);
|
||||
}
|
||||
private function isOpeningCdataTag(string $part) : bool
|
||||
{
|
||||
return \RectorPrefix20210521\Nette\Utils\Strings::contains($part, '<![CDATA[');
|
||||
return \RectorPrefix20210522\Nette\Utils\Strings::contains($part, '<![CDATA[');
|
||||
}
|
||||
private function isClosingCdataTag(string $part) : bool
|
||||
{
|
||||
return \RectorPrefix20210521\Nette\Utils\Strings::contains($part, ']]>');
|
||||
return \RectorPrefix20210522\Nette\Utils\Strings::contains($part, ']]>');
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ use Rector\FileFormatter\Contract\Formatter\FileFormatterInterface;
|
||||
use Rector\FileFormatter\ValueObject\EditorConfigConfiguration;
|
||||
use Rector\FileFormatter\ValueObject\Indent;
|
||||
use Rector\FileFormatter\ValueObjectFactory\EditorConfigConfigurationBuilder;
|
||||
use RectorPrefix20210521\Symfony\Component\Yaml\Yaml;
|
||||
use RectorPrefix20210522\Symfony\Component\Yaml\Yaml;
|
||||
/**
|
||||
* @see \Rector\Tests\FileFormatter\Formatter\YamlFileFormatter\YamlFileFormatterTest
|
||||
*/
|
||||
@ -21,8 +21,8 @@ final class YamlFileFormatter implements \Rector\FileFormatter\Contract\Formatte
|
||||
}
|
||||
public function format(\Rector\Core\ValueObject\Application\File $file, \Rector\FileFormatter\ValueObject\EditorConfigConfiguration $editorConfigConfiguration) : void
|
||||
{
|
||||
$yaml = \RectorPrefix20210521\Symfony\Component\Yaml\Yaml::parse($file->getFileContent());
|
||||
$newFileContent = \RectorPrefix20210521\Symfony\Component\Yaml\Yaml::dump($yaml, 99, $editorConfigConfiguration->getIndentSize());
|
||||
$yaml = \RectorPrefix20210522\Symfony\Component\Yaml\Yaml::parse($file->getFileContent());
|
||||
$newFileContent = \RectorPrefix20210522\Symfony\Component\Yaml\Yaml::dump($yaml, 99, $editorConfigConfiguration->getIndentSize());
|
||||
$file->changeFileContent($newFileContent);
|
||||
}
|
||||
public function createDefaultEditorConfigConfigurationBuilder() : \Rector\FileFormatter\ValueObjectFactory\EditorConfigConfigurationBuilder
|
||||
|
@ -3,7 +3,7 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\FileFormatter\ValueObject;
|
||||
|
||||
use RectorPrefix20210521\Nette\Utils\Strings;
|
||||
use RectorPrefix20210522\Nette\Utils\Strings;
|
||||
use Rector\FileFormatter\Exception\InvalidIndentSizeException;
|
||||
use Rector\FileFormatter\Exception\InvalidIndentStringException;
|
||||
use Rector\FileFormatter\Exception\InvalidIndentStyleException;
|
||||
@ -56,7 +56,7 @@ final class Indent
|
||||
*/
|
||||
public static function fromString(string $content)
|
||||
{
|
||||
$match = \RectorPrefix20210521\Nette\Utils\Strings::match($content, self::VALID_INDENT_REGEX);
|
||||
$match = \RectorPrefix20210522\Nette\Utils\Strings::match($content, self::VALID_INDENT_REGEX);
|
||||
if ($match === null) {
|
||||
throw \Rector\FileFormatter\Exception\InvalidIndentStringException::fromString($content);
|
||||
}
|
||||
@ -95,7 +95,7 @@ final class Indent
|
||||
*/
|
||||
public static function fromContent(string $content)
|
||||
{
|
||||
$match = \RectorPrefix20210521\Nette\Utils\Strings::match($content, self::PARSE_INDENT_REGEX);
|
||||
$match = \RectorPrefix20210522\Nette\Utils\Strings::match($content, self::PARSE_INDENT_REGEX);
|
||||
if (isset($match['indent'])) {
|
||||
return self::fromString($match['indent']);
|
||||
}
|
||||
@ -115,6 +115,6 @@ final class Indent
|
||||
}
|
||||
private function startsWithSpace() : bool
|
||||
{
|
||||
return \RectorPrefix20210521\Nette\Utils\Strings::startsWith($this->string, ' ');
|
||||
return \RectorPrefix20210522\Nette\Utils\Strings::startsWith($this->string, ' ');
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\FileFormatter\ValueObject;
|
||||
|
||||
use RectorPrefix20210521\Nette\Utils\Strings;
|
||||
use RectorPrefix20210522\Nette\Utils\Strings;
|
||||
use const PHP_EOL;
|
||||
use Rector\FileFormatter\Exception\InvalidNewLineStringException;
|
||||
use Stringable;
|
||||
@ -55,7 +55,7 @@ final class NewLine implements \Stringable
|
||||
*/
|
||||
public static function fromSingleCharacter(string $content)
|
||||
{
|
||||
$matches = \RectorPrefix20210521\Nette\Utils\Strings::match($content, self::VALID_NEWLINE_REGEX);
|
||||
$matches = \RectorPrefix20210522\Nette\Utils\Strings::match($content, self::VALID_NEWLINE_REGEX);
|
||||
if ($matches === null) {
|
||||
throw \Rector\FileFormatter\Exception\InvalidNewLineStringException::fromString($content);
|
||||
}
|
||||
@ -66,7 +66,7 @@ final class NewLine implements \Stringable
|
||||
*/
|
||||
public static function fromContent(string $content)
|
||||
{
|
||||
$match = \RectorPrefix20210521\Nette\Utils\Strings::match($content, self::NEWLINE_REGEX);
|
||||
$match = \RectorPrefix20210522\Nette\Utils\Strings::match($content, self::NEWLINE_REGEX);
|
||||
if (isset($match['newLine'])) {
|
||||
return self::fromSingleCharacter($match['newLine']);
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\FileSystemRector\ValueObjectFactory;
|
||||
|
||||
use RectorPrefix20210521\Nette\Utils\Strings;
|
||||
use RectorPrefix20210522\Nette\Utils\Strings;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Name;
|
||||
use PhpParser\Node\Name\FullyQualified;
|
||||
@ -60,7 +60,7 @@ final class AddedFileWithNodesFactory
|
||||
}
|
||||
// is already in the right group
|
||||
$currentNamespaceName = $currentNamespace->name->toString();
|
||||
if (\RectorPrefix20210521\Nette\Utils\Strings::endsWith($currentNamespaceName, '\\' . $desiredGroupName)) {
|
||||
if (\RectorPrefix20210522\Nette\Utils\Strings::endsWith($currentNamespaceName, '\\' . $desiredGroupName)) {
|
||||
return null;
|
||||
}
|
||||
$oldClassName = $currentNamespaceName . '\\' . $this->fileInfoDeletionAnalyzer->clearNameFromTestingPrefix($oldFileInfo->getBasenameWithoutSuffix());
|
||||
@ -71,7 +71,7 @@ final class AddedFileWithNodesFactory
|
||||
if ($oldClassName === $newClassName) {
|
||||
return null;
|
||||
}
|
||||
if (\RectorPrefix20210521\Nette\Utils\Strings::match($oldClassName, '#\\b' . $desiredGroupName . '\\b#')) {
|
||||
if (\RectorPrefix20210522\Nette\Utils\Strings::match($oldClassName, '#\\b' . $desiredGroupName . '\\b#')) {
|
||||
return null;
|
||||
}
|
||||
// 1. rename namespace
|
||||
|
@ -3,8 +3,8 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\NodeCollector\NodeCollector;
|
||||
|
||||
use RectorPrefix20210521\Nette\Utils\Arrays;
|
||||
use RectorPrefix20210521\Nette\Utils\Strings;
|
||||
use RectorPrefix20210522\Nette\Utils\Arrays;
|
||||
use RectorPrefix20210522\Nette\Utils\Strings;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Attribute;
|
||||
use PhpParser\Node\Expr;
|
||||
@ -168,7 +168,7 @@ final class NodeRepository
|
||||
}
|
||||
public function findClassMethod(string $className, string $methodName) : ?\PhpParser\Node\Stmt\ClassMethod
|
||||
{
|
||||
if (\RectorPrefix20210521\Nette\Utils\Strings::contains($methodName, '\\')) {
|
||||
if (\RectorPrefix20210522\Nette\Utils\Strings::contains($methodName, '\\')) {
|
||||
$message = \sprintf('Class and method arguments are switched in "%s"', __METHOD__);
|
||||
throw new \Rector\Core\Exception\ShouldNotHappenException($message);
|
||||
}
|
||||
@ -191,7 +191,7 @@ final class NodeRepository
|
||||
*/
|
||||
public function getMethodsCalls() : array
|
||||
{
|
||||
$calls = \RectorPrefix20210521\Nette\Utils\Arrays::flatten($this->callsByTypeAndMethod);
|
||||
$calls = \RectorPrefix20210522\Nette\Utils\Arrays::flatten($this->callsByTypeAndMethod);
|
||||
return \array_filter($calls, function (\PhpParser\Node $node) : bool {
|
||||
return $node instanceof \PhpParser\Node\Expr\MethodCall;
|
||||
});
|
||||
@ -270,7 +270,7 @@ final class NodeRepository
|
||||
{
|
||||
$classNodes = [];
|
||||
foreach ($this->parsedNodeCollector->getClasses() as $className => $classNode) {
|
||||
if (!\RectorPrefix20210521\Nette\Utils\Strings::endsWith($className, $suffix)) {
|
||||
if (!\RectorPrefix20210522\Nette\Utils\Strings::endsWith($className, $suffix)) {
|
||||
continue;
|
||||
}
|
||||
$classNodes[] = $classNode;
|
||||
|
@ -3,7 +3,7 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\NodeCollector\NodeCollector;
|
||||
|
||||
use RectorPrefix20210521\Nette\Utils\Strings;
|
||||
use RectorPrefix20210522\Nette\Utils\Strings;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\Array_;
|
||||
use PhpParser\Node\Expr\ClassConstFetch;
|
||||
@ -115,7 +115,7 @@ final class ParsedNodeCollector
|
||||
public function findByShortName(string $shortName) : ?\PhpParser\Node\Stmt\Class_
|
||||
{
|
||||
foreach ($this->classes as $className => $classNode) {
|
||||
if (\RectorPrefix20210521\Nette\Utils\Strings::endsWith($className, '\\' . $shortName)) {
|
||||
if (\RectorPrefix20210522\Nette\Utils\Strings::endsWith($className, '\\' . $shortName)) {
|
||||
return $classNode;
|
||||
}
|
||||
}
|
||||
@ -123,7 +123,7 @@ final class ParsedNodeCollector
|
||||
}
|
||||
public function findClassConstant(string $className, string $constantName) : ?\PhpParser\Node\Stmt\ClassConst
|
||||
{
|
||||
if (\RectorPrefix20210521\Nette\Utils\Strings::contains($constantName, '\\')) {
|
||||
if (\RectorPrefix20210522\Nette\Utils\Strings::contains($constantName, '\\')) {
|
||||
throw new \Rector\Core\Exception\ShouldNotHappenException(\sprintf('Switched arguments in "%s"', __METHOD__));
|
||||
}
|
||||
return $this->constantsByType[$className][$constantName] ?? null;
|
||||
|
@ -3,7 +3,7 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\NodeCollector;
|
||||
|
||||
use RectorPrefix20210521\Nette\Utils\Strings;
|
||||
use RectorPrefix20210522\Nette\Utils\Strings;
|
||||
use PHPStan\PhpDoc\ResolvedPhpDocBlock;
|
||||
use PHPStan\Reflection\ClassReflection;
|
||||
use PHPStan\Reflection\ReflectionProvider;
|
||||
@ -51,6 +51,6 @@ final class StaticAnalyzer
|
||||
if (!$resolvedPhpDocBlock instanceof \PHPStan\PhpDoc\ResolvedPhpDocBlock) {
|
||||
return \false;
|
||||
}
|
||||
return (bool) \RectorPrefix20210521\Nette\Utils\Strings::match($resolvedPhpDocBlock->getPhpDocString(), '#@method\\s*static\\s*(.*?)\\b' . $methodName . '\\b#');
|
||||
return (bool) \RectorPrefix20210522\Nette\Utils\Strings::match($resolvedPhpDocBlock->getPhpDocString(), '#@method\\s*static\\s*(.*?)\\b' . $methodName . '\\b#');
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user