mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-18 05:48:21 +01:00
Updated Rector to commit fc17cc90a9dbee71396866d1baf7c3fd3fef419b
fc17cc90a9
[Php80] Test for misplaced } on multiline in AnnotationToAttributeRector (#218)
This commit is contained in:
parent
eb2f72236a
commit
0f17e48d24
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env php
|
#!/usr/bin/env php
|
||||||
<?php
|
<?php
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
require_once __DIR__ . '/rector.php';
|
require_once __DIR__ . '/rector.php';
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Core\Bootstrap\RectorConfigsResolver;
|
use Rector\Core\Bootstrap\RectorConfigsResolver;
|
||||||
use Rector\Core\Console\ConsoleApplication;
|
use Rector\Core\Console\ConsoleApplication;
|
||||||
use Rector\Core\Console\Style\SymfonyStyleFactory;
|
use Rector\Core\Console\Style\SymfonyStyleFactory;
|
||||||
use Rector\Core\DependencyInjection\RectorContainerFactory;
|
use Rector\Core\DependencyInjection\RectorContainerFactory;
|
||||||
use Rector\Core\HttpKernel\RectorKernel;
|
use Rector\Core\HttpKernel\RectorKernel;
|
||||||
use RectorPrefix20210613\Symplify\PackageBuilder\Console\ShellCode;
|
use RectorPrefix20210614\Symplify\PackageBuilder\Console\ShellCode;
|
||||||
use RectorPrefix20210613\Symplify\PackageBuilder\Reflection\PrivatesCaller;
|
use RectorPrefix20210614\Symplify\PackageBuilder\Reflection\PrivatesCaller;
|
||||||
// @ intentionally: continue anyway
|
// @ intentionally: continue anyway
|
||||||
@\ini_set('memory_limit', '-1');
|
@\ini_set('memory_limit', '-1');
|
||||||
// Performance boost
|
// Performance boost
|
||||||
@ -18,20 +18,20 @@ use RectorPrefix20210613\Symplify\PackageBuilder\Reflection\PrivatesCaller;
|
|||||||
\gc_disable();
|
\gc_disable();
|
||||||
\define('__RECTOR_RUNNING__', \true);
|
\define('__RECTOR_RUNNING__', \true);
|
||||||
// Require Composer autoload.php
|
// Require Composer autoload.php
|
||||||
$autoloadIncluder = new \RectorPrefix20210613\AutoloadIncluder();
|
$autoloadIncluder = new \RectorPrefix20210614\AutoloadIncluder();
|
||||||
$autoloadIncluder->includeDependencyOrRepositoryVendorAutoloadIfExists();
|
$autoloadIncluder->includeDependencyOrRepositoryVendorAutoloadIfExists();
|
||||||
// load extracted PHPStan with its own preload.php
|
// load extracted PHPStan with its own preload.php
|
||||||
$extractedPhpstanAutoload = __DIR__ . '/../vendor/phpstan/phpstan-extracted/vendor/autoload.php';
|
$extractedPhpstanAutoload = __DIR__ . '/../vendor/phpstan/phpstan-extracted/vendor/autoload.php';
|
||||||
if (\file_exists($extractedPhpstanAutoload)) {
|
if (\file_exists($extractedPhpstanAutoload)) {
|
||||||
require_once $extractedPhpstanAutoload;
|
require_once $extractedPhpstanAutoload;
|
||||||
} elseif (\RectorPrefix20210613\should_include_preload()) {
|
} elseif (\RectorPrefix20210614\should_include_preload()) {
|
||||||
require_once __DIR__ . '/../preload.php';
|
require_once __DIR__ . '/../preload.php';
|
||||||
}
|
}
|
||||||
require_once __DIR__ . '/../src/constants.php';
|
require_once __DIR__ . '/../src/constants.php';
|
||||||
$autoloadIncluder->loadIfExistsAndNotLoadedYet(__DIR__ . '/../vendor/scoper-autoload.php');
|
$autoloadIncluder->loadIfExistsAndNotLoadedYet(__DIR__ . '/../vendor/scoper-autoload.php');
|
||||||
$autoloadIncluder->autoloadProjectAutoloaderFile();
|
$autoloadIncluder->autoloadProjectAutoloaderFile();
|
||||||
$autoloadIncluder->autoloadFromCommandLine();
|
$autoloadIncluder->autoloadFromCommandLine();
|
||||||
$symfonyStyleFactory = new \Rector\Core\Console\Style\SymfonyStyleFactory(new \RectorPrefix20210613\Symplify\PackageBuilder\Reflection\PrivatesCaller());
|
$symfonyStyleFactory = new \Rector\Core\Console\Style\SymfonyStyleFactory(new \RectorPrefix20210614\Symplify\PackageBuilder\Reflection\PrivatesCaller());
|
||||||
$symfonyStyle = $symfonyStyleFactory->create();
|
$symfonyStyle = $symfonyStyleFactory->create();
|
||||||
$rectorConfigsResolver = new \Rector\Core\Bootstrap\RectorConfigsResolver();
|
$rectorConfigsResolver = new \Rector\Core\Bootstrap\RectorConfigsResolver();
|
||||||
try {
|
try {
|
||||||
@ -40,7 +40,7 @@ try {
|
|||||||
$container = $rectorContainerFactory->createFromBootstrapConfigs($bootstrapConfigs);
|
$container = $rectorContainerFactory->createFromBootstrapConfigs($bootstrapConfigs);
|
||||||
} catch (\Throwable $throwable) {
|
} catch (\Throwable $throwable) {
|
||||||
$symfonyStyle->error($throwable->getMessage());
|
$symfonyStyle->error($throwable->getMessage());
|
||||||
exit(\RectorPrefix20210613\Symplify\PackageBuilder\Console\ShellCode::ERROR);
|
exit(\RectorPrefix20210614\Symplify\PackageBuilder\Console\ShellCode::ERROR);
|
||||||
}
|
}
|
||||||
/** @var ConsoleApplication $application */
|
/** @var ConsoleApplication $application */
|
||||||
$application = $container->get(\Rector\Core\Console\ConsoleApplication::class);
|
$application = $container->get(\Rector\Core\Console\ConsoleApplication::class);
|
||||||
@ -94,7 +94,7 @@ final class AutoloadIncluder
|
|||||||
require_once $filePath;
|
require_once $filePath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
\class_alias('RectorPrefix20210613\\AutoloadIncluder', 'AutoloadIncluder', \false);
|
\class_alias('RectorPrefix20210614\\AutoloadIncluder', 'AutoloadIncluder', \false);
|
||||||
// load local php-parser only in prefixed version or development repository
|
// load local php-parser only in prefixed version or development repository
|
||||||
function should_include_preload() : bool
|
function should_include_preload() : bool
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Core\Bootstrap\ExtensionConfigResolver;
|
use Rector\Core\Bootstrap\ExtensionConfigResolver;
|
||||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Core\Configuration\Option;
|
use Rector\Core\Configuration\Option;
|
||||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||||
return static function (\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
return static function (\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Core\Configuration\Option;
|
use Rector\Core\Configuration\Option;
|
||||||
use Rector\PSR4\Composer\PSR4NamespaceMatcher;
|
use Rector\PSR4\Composer\PSR4NamespaceMatcher;
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use RectorPrefix20210613\Composer\Semver\VersionParser;
|
use RectorPrefix20210614\Composer\Semver\VersionParser;
|
||||||
use RectorPrefix20210613\Doctrine\Inflector\Inflector;
|
use RectorPrefix20210614\Doctrine\Inflector\Inflector;
|
||||||
use RectorPrefix20210613\Doctrine\Inflector\Rules\English\InflectorFactory;
|
use RectorPrefix20210614\Doctrine\Inflector\Rules\English\InflectorFactory;
|
||||||
use RectorPrefix20210613\Ergebnis\Json\Printer\Printer;
|
use RectorPrefix20210614\Ergebnis\Json\Printer\Printer;
|
||||||
use RectorPrefix20210613\Ergebnis\Json\Printer\PrinterInterface;
|
use RectorPrefix20210614\Ergebnis\Json\Printer\PrinterInterface;
|
||||||
use RectorPrefix20210613\Idiosyncratic\EditorConfig\EditorConfig;
|
use RectorPrefix20210614\Idiosyncratic\EditorConfig\EditorConfig;
|
||||||
use PhpParser\BuilderFactory;
|
use PhpParser\BuilderFactory;
|
||||||
use PhpParser\Lexer;
|
use PhpParser\Lexer;
|
||||||
use PhpParser\NodeFinder;
|
use PhpParser\NodeFinder;
|
||||||
@ -33,70 +33,70 @@ use Rector\Core\PhpParser\Parser\PhpParserLexerFactory;
|
|||||||
use Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory;
|
use Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory;
|
||||||
use Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocator\IntermediateSourceLocator;
|
use Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocator\IntermediateSourceLocator;
|
||||||
use Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocatorProvider\DynamicSourceLocatorProvider;
|
use Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocatorProvider\DynamicSourceLocatorProvider;
|
||||||
use RectorPrefix20210613\Symfony\Component\Console\Application as SymfonyApplication;
|
use RectorPrefix20210614\Symfony\Component\Console\Application as SymfonyApplication;
|
||||||
use RectorPrefix20210613\Symfony\Component\Console\Style\SymfonyStyle;
|
use RectorPrefix20210614\Symfony\Component\Console\Style\SymfonyStyle;
|
||||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||||
use function RectorPrefix20210613\Symfony\Component\DependencyInjection\Loader\Configurator\service;
|
use function RectorPrefix20210614\Symfony\Component\DependencyInjection\Loader\Configurator\service;
|
||||||
use RectorPrefix20210613\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser;
|
use RectorPrefix20210614\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser;
|
||||||
use RectorPrefix20210613\Symplify\PackageBuilder\Console\Command\CommandNaming;
|
use RectorPrefix20210614\Symplify\PackageBuilder\Console\Command\CommandNaming;
|
||||||
use RectorPrefix20210613\Symplify\PackageBuilder\Console\Style\SymfonyStyleFactory;
|
use RectorPrefix20210614\Symplify\PackageBuilder\Console\Style\SymfonyStyleFactory;
|
||||||
use RectorPrefix20210613\Symplify\PackageBuilder\Parameter\ParameterProvider;
|
use RectorPrefix20210614\Symplify\PackageBuilder\Parameter\ParameterProvider;
|
||||||
use RectorPrefix20210613\Symplify\PackageBuilder\Php\TypeChecker;
|
use RectorPrefix20210614\Symplify\PackageBuilder\Php\TypeChecker;
|
||||||
use RectorPrefix20210613\Symplify\PackageBuilder\Reflection\PrivatesAccessor;
|
use RectorPrefix20210614\Symplify\PackageBuilder\Reflection\PrivatesAccessor;
|
||||||
use RectorPrefix20210613\Symplify\PackageBuilder\Reflection\PrivatesCaller;
|
use RectorPrefix20210614\Symplify\PackageBuilder\Reflection\PrivatesCaller;
|
||||||
use RectorPrefix20210613\Symplify\PackageBuilder\Strings\StringFormatConverter;
|
use RectorPrefix20210614\Symplify\PackageBuilder\Strings\StringFormatConverter;
|
||||||
use RectorPrefix20210613\Symplify\SmartFileSystem\FileSystemFilter;
|
use RectorPrefix20210614\Symplify\SmartFileSystem\FileSystemFilter;
|
||||||
use RectorPrefix20210613\Symplify\SmartFileSystem\FileSystemGuard;
|
use RectorPrefix20210614\Symplify\SmartFileSystem\FileSystemGuard;
|
||||||
use RectorPrefix20210613\Symplify\SmartFileSystem\Finder\FinderSanitizer;
|
use RectorPrefix20210614\Symplify\SmartFileSystem\Finder\FinderSanitizer;
|
||||||
use RectorPrefix20210613\Symplify\SmartFileSystem\Json\JsonFileSystem;
|
use RectorPrefix20210614\Symplify\SmartFileSystem\Json\JsonFileSystem;
|
||||||
use RectorPrefix20210613\Symplify\SmartFileSystem\SmartFileSystem;
|
use RectorPrefix20210614\Symplify\SmartFileSystem\SmartFileSystem;
|
||||||
return static function (\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
return static function (\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||||
$services = $containerConfigurator->services();
|
$services = $containerConfigurator->services();
|
||||||
$services->defaults()->public()->autowire()->autoconfigure();
|
$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->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(\RectorPrefix20210613\Symfony\Component\Console\Application::class, \Rector\Core\Console\ConsoleApplication::class);
|
$services->alias(\RectorPrefix20210614\Symfony\Component\Console\Application::class, \Rector\Core\Console\ConsoleApplication::class);
|
||||||
$services->set(\RectorPrefix20210613\Symplify\SmartFileSystem\FileSystemGuard::class);
|
$services->set(\RectorPrefix20210614\Symplify\SmartFileSystem\FileSystemGuard::class);
|
||||||
$services->set(\RectorPrefix20210613\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser::class);
|
$services->set(\RectorPrefix20210614\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser::class);
|
||||||
$services->set(\PhpParser\ParserFactory::class);
|
$services->set(\PhpParser\ParserFactory::class);
|
||||||
$services->set(\PhpParser\BuilderFactory::class);
|
$services->set(\PhpParser\BuilderFactory::class);
|
||||||
$services->set(\PhpParser\NodeVisitor\CloningVisitor::class);
|
$services->set(\PhpParser\NodeVisitor\CloningVisitor::class);
|
||||||
$services->set(\PhpParser\NodeFinder::class);
|
$services->set(\PhpParser\NodeFinder::class);
|
||||||
$services->set(\PhpParser\Parser::class)->factory([\RectorPrefix20210613\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\Core\PhpParser\Parser\NikicPhpParserFactory::class), 'create']);
|
$services->set(\PhpParser\Parser::class)->factory([\RectorPrefix20210614\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\Core\PhpParser\Parser\NikicPhpParserFactory::class), 'create']);
|
||||||
$services->set(\PhpParser\Lexer::class)->factory([\RectorPrefix20210613\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\Core\PhpParser\Parser\PhpParserLexerFactory::class), 'create']);
|
$services->set(\PhpParser\Lexer::class)->factory([\RectorPrefix20210614\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\Core\PhpParser\Parser\PhpParserLexerFactory::class), 'create']);
|
||||||
// symplify/package-builder
|
// symplify/package-builder
|
||||||
$services->set(\RectorPrefix20210613\Symplify\PackageBuilder\Reflection\PrivatesAccessor::class);
|
$services->set(\RectorPrefix20210614\Symplify\PackageBuilder\Reflection\PrivatesAccessor::class);
|
||||||
$services->set(\RectorPrefix20210613\Symplify\PackageBuilder\Reflection\PrivatesCaller::class);
|
$services->set(\RectorPrefix20210614\Symplify\PackageBuilder\Reflection\PrivatesCaller::class);
|
||||||
$services->set(\RectorPrefix20210613\Symplify\SmartFileSystem\Finder\FinderSanitizer::class);
|
$services->set(\RectorPrefix20210614\Symplify\SmartFileSystem\Finder\FinderSanitizer::class);
|
||||||
$services->set(\RectorPrefix20210613\Symplify\SmartFileSystem\FileSystemFilter::class);
|
$services->set(\RectorPrefix20210614\Symplify\SmartFileSystem\FileSystemFilter::class);
|
||||||
$services->set(\RectorPrefix20210613\Symplify\PackageBuilder\Parameter\ParameterProvider::class)->arg('$container', \RectorPrefix20210613\Symfony\Component\DependencyInjection\Loader\Configurator\service('service_container'));
|
$services->set(\RectorPrefix20210614\Symplify\PackageBuilder\Parameter\ParameterProvider::class)->arg('$container', \RectorPrefix20210614\Symfony\Component\DependencyInjection\Loader\Configurator\service('service_container'));
|
||||||
$services->set(\RectorPrefix20210613\Symplify\PackageBuilder\Console\Command\CommandNaming::class);
|
$services->set(\RectorPrefix20210614\Symplify\PackageBuilder\Console\Command\CommandNaming::class);
|
||||||
$services->set(\RectorPrefix20210613\Symplify\SmartFileSystem\SmartFileSystem::class);
|
$services->set(\RectorPrefix20210614\Symplify\SmartFileSystem\SmartFileSystem::class);
|
||||||
$services->set(\RectorPrefix20210613\Symplify\PackageBuilder\Strings\StringFormatConverter::class);
|
$services->set(\RectorPrefix20210614\Symplify\PackageBuilder\Strings\StringFormatConverter::class);
|
||||||
$services->set(\RectorPrefix20210613\Symplify\PackageBuilder\Console\Style\SymfonyStyleFactory::class);
|
$services->set(\RectorPrefix20210614\Symplify\PackageBuilder\Console\Style\SymfonyStyleFactory::class);
|
||||||
$services->set(\RectorPrefix20210613\Symfony\Component\Console\Style\SymfonyStyle::class)->factory([\RectorPrefix20210613\Symfony\Component\DependencyInjection\Loader\Configurator\service(\RectorPrefix20210613\Symplify\PackageBuilder\Console\Style\SymfonyStyleFactory::class), 'create']);
|
$services->set(\RectorPrefix20210614\Symfony\Component\Console\Style\SymfonyStyle::class)->factory([\RectorPrefix20210614\Symfony\Component\DependencyInjection\Loader\Configurator\service(\RectorPrefix20210614\Symplify\PackageBuilder\Console\Style\SymfonyStyleFactory::class), 'create']);
|
||||||
$services->set(\RectorPrefix20210613\Symplify\SmartFileSystem\Json\JsonFileSystem::class);
|
$services->set(\RectorPrefix20210614\Symplify\SmartFileSystem\Json\JsonFileSystem::class);
|
||||||
$services->set(\PhpParser\NodeVisitor\NodeConnectingVisitor::class);
|
$services->set(\PhpParser\NodeVisitor\NodeConnectingVisitor::class);
|
||||||
$services->set(\RectorPrefix20210613\Doctrine\Inflector\Rules\English\InflectorFactory::class);
|
$services->set(\RectorPrefix20210614\Doctrine\Inflector\Rules\English\InflectorFactory::class);
|
||||||
$services->set(\RectorPrefix20210613\Doctrine\Inflector\Inflector::class)->factory([\RectorPrefix20210613\Symfony\Component\DependencyInjection\Loader\Configurator\service(\RectorPrefix20210613\Doctrine\Inflector\Rules\English\InflectorFactory::class), 'build']);
|
$services->set(\RectorPrefix20210614\Doctrine\Inflector\Inflector::class)->factory([\RectorPrefix20210614\Symfony\Component\DependencyInjection\Loader\Configurator\service(\RectorPrefix20210614\Doctrine\Inflector\Rules\English\InflectorFactory::class), 'build']);
|
||||||
$services->set(\RectorPrefix20210613\Composer\Semver\VersionParser::class);
|
$services->set(\RectorPrefix20210614\Composer\Semver\VersionParser::class);
|
||||||
$services->set(\RectorPrefix20210613\Symplify\PackageBuilder\Php\TypeChecker::class);
|
$services->set(\RectorPrefix20210614\Symplify\PackageBuilder\Php\TypeChecker::class);
|
||||||
// phpdoc parser
|
// phpdoc parser
|
||||||
$services->set(\PHPStan\PhpDocParser\Lexer\Lexer::class);
|
$services->set(\PHPStan\PhpDocParser\Lexer\Lexer::class);
|
||||||
$services->alias(\PHPStan\PhpDocParser\Parser\PhpDocParser::class, \Rector\BetterPhpDocParser\PhpDocParser\BetterPhpDocParser::class);
|
$services->alias(\PHPStan\PhpDocParser\Parser\PhpDocParser::class, \Rector\BetterPhpDocParser\PhpDocParser\BetterPhpDocParser::class);
|
||||||
// cache
|
// cache
|
||||||
$services->set(\PHPStan\Dependency\DependencyResolver::class)->factory([\RectorPrefix20210613\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createDependencyResolver']);
|
$services->set(\PHPStan\Dependency\DependencyResolver::class)->factory([\RectorPrefix20210614\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createDependencyResolver']);
|
||||||
$services->set(\PHPStan\File\FileHelper::class)->factory([\RectorPrefix20210613\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createFileHelper']);
|
$services->set(\PHPStan\File\FileHelper::class)->factory([\RectorPrefix20210614\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createFileHelper']);
|
||||||
$services->set(\Rector\Caching\Cache::class)->factory([\RectorPrefix20210613\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\Caching\CacheFactory::class), 'create']);
|
$services->set(\Rector\Caching\Cache::class)->factory([\RectorPrefix20210614\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\Caching\CacheFactory::class), 'create']);
|
||||||
// type resolving
|
// type resolving
|
||||||
$services->set(\Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocator\IntermediateSourceLocator::class);
|
$services->set(\Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocator\IntermediateSourceLocator::class);
|
||||||
$services->alias(\PHPStan\PhpDocParser\Parser\TypeParser::class, \Rector\BetterPhpDocParser\PhpDocParser\BetterTypeParser::class);
|
$services->alias(\PHPStan\PhpDocParser\Parser\TypeParser::class, \Rector\BetterPhpDocParser\PhpDocParser\BetterTypeParser::class);
|
||||||
// PHPStan services
|
// PHPStan services
|
||||||
$services->set(\PHPStan\Reflection\ReflectionProvider::class)->factory([\RectorPrefix20210613\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createReflectionProvider']);
|
$services->set(\PHPStan\Reflection\ReflectionProvider::class)->factory([\RectorPrefix20210614\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createReflectionProvider']);
|
||||||
$services->set(\PHPStan\Analyser\NodeScopeResolver::class)->factory([\RectorPrefix20210613\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createNodeScopeResolver']);
|
$services->set(\PHPStan\Analyser\NodeScopeResolver::class)->factory([\RectorPrefix20210614\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createNodeScopeResolver']);
|
||||||
$services->set(\PHPStan\Analyser\ScopeFactory::class)->factory([\RectorPrefix20210613\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createScopeFactory']);
|
$services->set(\PHPStan\Analyser\ScopeFactory::class)->factory([\RectorPrefix20210614\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createScopeFactory']);
|
||||||
$services->set(\PHPStan\PhpDoc\TypeNodeResolver::class)->factory([\RectorPrefix20210613\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createTypeNodeResolver']);
|
$services->set(\PHPStan\PhpDoc\TypeNodeResolver::class)->factory([\RectorPrefix20210614\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createTypeNodeResolver']);
|
||||||
$services->set(\Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocatorProvider\DynamicSourceLocatorProvider::class)->factory([\RectorPrefix20210613\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createDynamicSourceLocatorProvider']);
|
$services->set(\Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocatorProvider\DynamicSourceLocatorProvider::class)->factory([\RectorPrefix20210614\Symfony\Component\DependencyInjection\Loader\Configurator\service(\Rector\NodeTypeResolver\DependencyInjection\PHPStanServicesFactory::class), 'createDynamicSourceLocatorProvider']);
|
||||||
$services->set(\RectorPrefix20210613\Ergebnis\Json\Printer\Printer::class);
|
$services->set(\RectorPrefix20210614\Ergebnis\Json\Printer\Printer::class);
|
||||||
$services->alias(\RectorPrefix20210613\Ergebnis\Json\Printer\PrinterInterface::class, \RectorPrefix20210613\Ergebnis\Json\Printer\Printer::class);
|
$services->alias(\RectorPrefix20210614\Ergebnis\Json\Printer\PrinterInterface::class, \RectorPrefix20210614\Ergebnis\Json\Printer\Printer::class);
|
||||||
$services->set(\RectorPrefix20210613\Idiosyncratic\EditorConfig\EditorConfig::class);
|
$services->set(\RectorPrefix20210614\Idiosyncratic\EditorConfig\EditorConfig::class);
|
||||||
};
|
};
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\DependencyInjection\Rector\Class_\ActionInjectionToConstructorInjectionRector;
|
use Rector\DependencyInjection\Rector\Class_\ActionInjectionToConstructorInjectionRector;
|
||||||
use Rector\DependencyInjection\Rector\Variable\ReplaceVariableByPropertyFetchRector;
|
use Rector\DependencyInjection\Rector\Variable\ReplaceVariableByPropertyFetchRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Carbon\Rector\MethodCall\ChangeCarbonSingularMethodCallToPluralRector;
|
use Rector\Carbon\Rector\MethodCall\ChangeCarbonSingularMethodCallToPluralRector;
|
||||||
use Rector\Carbon\Rector\MethodCall\ChangeDiffForHumansArgsRector;
|
use Rector\Carbon\Rector\MethodCall\ChangeDiffForHumansArgsRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector;
|
use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector;
|
||||||
use Rector\CodeQualityStrict\Rector\If_\MoveOutMethodCallInsideIfConditionRector;
|
use Rector\CodeQualityStrict\Rector\If_\MoveOutMethodCallInsideIfConditionRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\CodeQuality\Rector\Array_\ArrayThisCallToThisMethodCallRector;
|
use Rector\CodeQuality\Rector\Array_\ArrayThisCallToThisMethodCallRector;
|
||||||
use Rector\CodeQuality\Rector\Array_\CallableThisArrayToAnonymousFunctionRector;
|
use Rector\CodeQuality\Rector\Array_\CallableThisArrayToAnonymousFunctionRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\CodingStyle\Rector\MethodCall\UseMessageVariableForSprintfInSymfonyStyleRector;
|
use Rector\CodingStyle\Rector\MethodCall\UseMessageVariableForSprintfInSymfonyStyleRector;
|
||||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\CodingStyle\Rector\Assign\ManualJsonStringToJsonEncodeArrayRector;
|
use Rector\CodingStyle\Rector\Assign\ManualJsonStringToJsonEncodeArrayRector;
|
||||||
use Rector\CodingStyle\Rector\Assign\PHPStormVarAnnotationRector;
|
use Rector\CodingStyle\Rector\Assign\PHPStormVarAnnotationRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\CodeQuality\Rector\Return_\SimplifyUselessVariableRector;
|
use Rector\CodeQuality\Rector\Return_\SimplifyUselessVariableRector;
|
||||||
use Rector\DeadCode\Rector\Array_\RemoveDuplicatedArrayKeyRector;
|
use Rector\DeadCode\Rector\Array_\RemoveDuplicatedArrayKeyRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Defluent\Rector\ClassMethod\ReturnThisRemoveRector;
|
use Rector\Defluent\Rector\ClassMethod\ReturnThisRemoveRector;
|
||||||
use Rector\Defluent\Rector\MethodCall\FluentChainMethodCallToNormalMethodCallRector;
|
use Rector\Defluent\Rector\MethodCall\FluentChainMethodCallToNormalMethodCallRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Core\Configuration\Option;
|
use Rector\Core\Configuration\Option;
|
||||||
use Rector\Core\ValueObject\PhpVersion;
|
use Rector\Core\ValueObject\PhpVersion;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Core\Configuration\Option;
|
use Rector\Core\Configuration\Option;
|
||||||
use Rector\Core\ValueObject\PhpVersion;
|
use Rector\Core\ValueObject\PhpVersion;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Core\Configuration\Option;
|
use Rector\Core\Configuration\Option;
|
||||||
use Rector\Core\ValueObject\PhpVersion;
|
use Rector\Core\ValueObject\PhpVersion;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Core\Configuration\Option;
|
use Rector\Core\Configuration\Option;
|
||||||
use Rector\Core\ValueObject\PhpVersion;
|
use Rector\Core\ValueObject\PhpVersion;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Core\Configuration\Option;
|
use Rector\Core\Configuration\Option;
|
||||||
use Rector\Core\ValueObject\PhpVersion;
|
use Rector\Core\ValueObject\PhpVersion;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Core\Configuration\Option;
|
use Rector\Core\Configuration\Option;
|
||||||
use Rector\Core\ValueObject\PhpVersion;
|
use Rector\Core\ValueObject\PhpVersion;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Core\Configuration\Option;
|
use Rector\Core\Configuration\Option;
|
||||||
use Rector\Core\ValueObject\PhpVersion;
|
use Rector\Core\ValueObject\PhpVersion;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector;
|
use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector;
|
||||||
use Rector\EarlyReturn\Rector\Foreach_\ReturnAfterToEarlyOnBreakRector;
|
use Rector\EarlyReturn\Rector\Foreach_\ReturnAfterToEarlyOnBreakRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
|
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
|
||||||
use Rector\Renaming\ValueObject\MethodCallRename;
|
use Rector\Renaming\ValueObject\MethodCallRename;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Symfony\Rector\ClassMethod\RemoveServiceFromSensioRouteRector;
|
use Rector\Symfony\Rector\ClassMethod\RemoveServiceFromSensioRouteRector;
|
||||||
use Rector\Symfony\Rector\ClassMethod\ReplaceSensioRouteAnnotationWithSymfonyRector;
|
use Rector\Symfony\Rector\ClassMethod\ReplaceSensioRouteAnnotationWithSymfonyRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Symfony\Rector\ClassMethod\TemplateAnnotationToThisRenderRector;
|
use Rector\Symfony\Rector\ClassMethod\TemplateAnnotationToThisRenderRector;
|
||||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
|
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
|
||||||
use Rector\Renaming\Rector\Name\RenameClassRector;
|
use Rector\Renaming\Rector\Name\RenameClassRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Defluent\Rector\MethodCall\FluentChainMethodCallToNormalMethodCallRector;
|
use Rector\Defluent\Rector\MethodCall\FluentChainMethodCallToNormalMethodCallRector;
|
||||||
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
|
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Core\ValueObject\Visibility;
|
use Rector\Core\ValueObject\Visibility;
|
||||||
use Rector\NetteToSymfony\Rector\MethodCall\WrapTransParameterNameRector;
|
use Rector\NetteToSymfony\Rector\MethodCall\WrapTransParameterNameRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use PHPStan\Type\ObjectWithoutClassType;
|
use PHPStan\Type\ObjectWithoutClassType;
|
||||||
use PHPStan\Type\StringType;
|
use PHPStan\Type\StringType;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
|
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
|
||||||
use Rector\Renaming\ValueObject\MethodCallRename;
|
use Rector\Renaming\ValueObject\MethodCallRename;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Arguments\Rector\FuncCall\SwapFuncCallArgumentsRector;
|
use Rector\Arguments\Rector\FuncCall\SwapFuncCallArgumentsRector;
|
||||||
use Rector\Arguments\ValueObject\SwapFuncCallArguments;
|
use Rector\Arguments\ValueObject\SwapFuncCallArguments;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Naming\Rector\Assign\RenameVariableToMatchMethodCallReturnTypeRector;
|
use Rector\Naming\Rector\Assign\RenameVariableToMatchMethodCallReturnTypeRector;
|
||||||
use Rector\Naming\Rector\Class_\RenamePropertyToMatchTypeRector;
|
use Rector\Naming\Rector\Class_\RenamePropertyToMatchTypeRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Order\Rector\Class_\OrderClassConstantsByIntegerValueRector;
|
use Rector\Order\Rector\Class_\OrderClassConstantsByIntegerValueRector;
|
||||||
use Rector\Order\Rector\Class_\OrderConstantsByVisibilityRector;
|
use Rector\Order\Rector\Class_\OrderConstantsByVisibilityRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Renaming\Rector\ConstFetch\RenameConstantRector;
|
use Rector\Renaming\Rector\ConstFetch\RenameConstantRector;
|
||||||
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
|
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Php52\Rector\Property\VarToPublicPropertyRector;
|
use Rector\Php52\Rector\Property\VarToPublicPropertyRector;
|
||||||
use Rector\Php52\Rector\Switch_\ContinueToBreakInSwitchRector;
|
use Rector\Php52\Rector\Switch_\ContinueToBreakInSwitchRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Php53\Rector\AssignRef\ClearReturnNewByReferenceRector;
|
use Rector\Php53\Rector\AssignRef\ClearReturnNewByReferenceRector;
|
||||||
use Rector\Php53\Rector\FuncCall\DirNameFileConstantToDirConstantRector;
|
use Rector\Php53\Rector\FuncCall\DirNameFileConstantToDirConstantRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Php54\Rector\Break_\RemoveZeroBreakContinueRector;
|
use Rector\Php54\Rector\Break_\RemoveZeroBreakContinueRector;
|
||||||
use Rector\Php54\Rector\FuncCall\RemoveReferenceFromCallRector;
|
use Rector\Php54\Rector\FuncCall\RemoveReferenceFromCallRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Php55\Rector\Class_\ClassConstantToSelfClassRector;
|
use Rector\Php55\Rector\Class_\ClassConstantToSelfClassRector;
|
||||||
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
|
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Php56\Rector\FuncCall\PowToExpRector;
|
use Rector\Php56\Rector\FuncCall\PowToExpRector;
|
||||||
use Rector\Php56\Rector\FunctionLike\AddDefaultValueForUndefinedVariableRector;
|
use Rector\Php56\Rector\FunctionLike\AddDefaultValueForUndefinedVariableRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Php70\Rector\Assign\ListSplitStringRector;
|
use Rector\Php70\Rector\Assign\ListSplitStringRector;
|
||||||
use Rector\Php70\Rector\Assign\ListSwapArrayOrderRector;
|
use Rector\Php70\Rector\Assign\ListSwapArrayOrderRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Php71\Rector\Assign\AssignArrayToStringRector;
|
use Rector\Php71\Rector\Assign\AssignArrayToStringRector;
|
||||||
use Rector\Php71\Rector\BinaryOp\BinaryOpBetweenNumberAndStringRector;
|
use Rector\Php71\Rector\BinaryOp\BinaryOpBetweenNumberAndStringRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Php72\Rector\Assign\ListEachRector;
|
use Rector\Php72\Rector\Assign\ListEachRector;
|
||||||
use Rector\Php72\Rector\Assign\ReplaceEachAssignmentWithKeyCurrentRector;
|
use Rector\Php72\Rector\Assign\ReplaceEachAssignmentWithKeyCurrentRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Php52\Rector\Switch_\ContinueToBreakInSwitchRector;
|
use Rector\Php52\Rector\Switch_\ContinueToBreakInSwitchRector;
|
||||||
use Rector\Php73\Rector\BooleanOr\IsCountableRector;
|
use Rector\Php73\Rector\BooleanOr\IsCountableRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Php74\Rector\Assign\NullCoalescingOperatorRector;
|
use Rector\Php74\Rector\Assign\NullCoalescingOperatorRector;
|
||||||
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
|
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Arguments\Rector\ClassMethod\ArgumentAdderRector;
|
use Rector\Arguments\Rector\ClassMethod\ArgumentAdderRector;
|
||||||
use Rector\Arguments\Rector\FuncCall\FunctionArgumentDefaultValueReplacerRector;
|
use Rector\Arguments\Rector\FuncCall\FunctionArgumentDefaultValueReplacerRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Php81\Rector\Class_\MyCLabsClassToEnumRector;
|
use Rector\Php81\Rector\Class_\MyCLabsClassToEnumRector;
|
||||||
use Rector\Php81\Rector\MethodCall\MyCLabsMethodCallToEnumConstRector;
|
use Rector\Php81\Rector\MethodCall\MyCLabsMethodCallToEnumConstRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\PHPOffice\Rector\MethodCall\ChangeConditionalGetConditionRector;
|
use Rector\PHPOffice\Rector\MethodCall\ChangeConditionalGetConditionRector;
|
||||||
use Rector\PHPOffice\Rector\MethodCall\ChangeConditionalReturnedCellRector;
|
use Rector\PHPOffice\Rector\MethodCall\ChangeConditionalReturnedCellRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\PhpSpecToPHPUnit\Rector\Class_\AddMockPropertiesRector;
|
use Rector\PhpSpecToPHPUnit\Rector\Class_\AddMockPropertiesRector;
|
||||||
use Rector\PhpSpecToPHPUnit\Rector\Class_\PhpSpecClassToPHPUnitClassRector;
|
use Rector\PhpSpecToPHPUnit\Rector\Class_\PhpSpecClassToPHPUnitClassRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
|
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
|
||||||
use Rector\Renaming\Rector\Name\RenameClassRector;
|
use Rector\Renaming\Rector\Name\RenameClassRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use PHPStan\Type\ArrayType;
|
use PHPStan\Type\ArrayType;
|
||||||
use PHPStan\Type\MixedType;
|
use PHPStan\Type\MixedType;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Privatization\Rector\Class_\ChangeLocalPropertyToVariableRector;
|
use Rector\Privatization\Rector\Class_\ChangeLocalPropertyToVariableRector;
|
||||||
use Rector\Privatization\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector;
|
use Rector\Privatization\Rector\Class_\ChangeReadOnlyVariableWithDefaultValueToConstantRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\PSR4\Rector\FileWithoutNamespace\NormalizeNamespaceByPSR4ComposerAutoloadRector;
|
use Rector\PSR4\Rector\FileWithoutNamespace\NormalizeNamespaceByPSR4ComposerAutoloadRector;
|
||||||
use Rector\PSR4\Rector\Namespace_\MultipleClassFileToPsr4ClassesRector;
|
use Rector\PSR4\Rector\Namespace_\MultipleClassFileToPsr4ClassesRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\Renaming\Rector\FuncCall\RenameFunctionRector;
|
use Rector\Renaming\Rector\FuncCall\RenameFunctionRector;
|
||||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\TypeDeclaration\Rector\ClassMethod\AddMethodCallBasedStrictParamTypeRector;
|
use Rector\TypeDeclaration\Rector\ClassMethod\AddMethodCallBasedStrictParamTypeRector;
|
||||||
use Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector;
|
use Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\TypeDeclaration\Rector\ClassMethod\AddArrayParamDocTypeRector;
|
use Rector\TypeDeclaration\Rector\ClassMethod\AddArrayParamDocTypeRector;
|
||||||
use Rector\TypeDeclaration\Rector\ClassMethod\AddArrayReturnDocTypeRector;
|
use Rector\TypeDeclaration\Rector\ClassMethod\AddArrayReturnDocTypeRector;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace RectorPrefix20210613;
|
namespace RectorPrefix20210614;
|
||||||
|
|
||||||
use Rector\DeadCode\Rector\If_\UnwrapFutureCompatibleIfFunctionExistsRector;
|
use Rector\DeadCode\Rector\If_\UnwrapFutureCompatibleIfFunctionExistsRector;
|
||||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||||
|
@ -6,14 +6,14 @@ namespace Rector\BetterPhpDocParser\Comment;
|
|||||||
use PhpParser\Comment;
|
use PhpParser\Comment;
|
||||||
use PhpParser\Node;
|
use PhpParser\Node;
|
||||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||||
use RectorPrefix20210613\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser;
|
use RectorPrefix20210614\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser;
|
||||||
final class CommentsMerger
|
final class CommentsMerger
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var \Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser
|
* @var \Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser
|
||||||
*/
|
*/
|
||||||
private $simpleCallableNodeTraverser;
|
private $simpleCallableNodeTraverser;
|
||||||
public function __construct(\RectorPrefix20210613\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser $simpleCallableNodeTraverser)
|
public function __construct(\RectorPrefix20210614\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser $simpleCallableNodeTraverser)
|
||||||
{
|
{
|
||||||
$this->simpleCallableNodeTraverser = $simpleCallableNodeTraverser;
|
$this->simpleCallableNodeTraverser = $simpleCallableNodeTraverser;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace Rector\BetterPhpDocParser\Contract;
|
namespace Rector\BetterPhpDocParser\Contract;
|
||||||
|
|
||||||
use RectorPrefix20210613\Symplify\SimplePhpDocParser\Contract\PhpDocNodeVisitorInterface;
|
use RectorPrefix20210614\Symplify\SimplePhpDocParser\Contract\PhpDocNodeVisitorInterface;
|
||||||
interface BasePhpDocNodeVisitorInterface extends \RectorPrefix20210613\Symplify\SimplePhpDocParser\Contract\PhpDocNodeVisitorInterface
|
interface BasePhpDocNodeVisitorInterface extends \RectorPrefix20210614\Symplify\SimplePhpDocParser\Contract\PhpDocNodeVisitorInterface
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace Rector\BetterPhpDocParser\PhpDocInfo;
|
namespace Rector\BetterPhpDocParser\PhpDocInfo;
|
||||||
|
|
||||||
use RectorPrefix20210613\Nette\Utils\Strings;
|
use RectorPrefix20210614\Nette\Utils\Strings;
|
||||||
use PHPStan\PhpDocParser\Ast\Node;
|
use PHPStan\PhpDocParser\Ast\Node;
|
||||||
use PHPStan\PhpDocParser\Ast\PhpDoc\InvalidTagValueNode;
|
use PHPStan\PhpDocParser\Ast\PhpDoc\InvalidTagValueNode;
|
||||||
use PHPStan\PhpDocParser\Ast\PhpDoc\MethodTagValueNode;
|
use PHPStan\PhpDocParser\Ast\PhpDoc\MethodTagValueNode;
|
||||||
@ -30,7 +30,7 @@ use Rector\ChangesReporting\Collector\RectorChangeCollector;
|
|||||||
use Rector\Core\Configuration\CurrentNodeProvider;
|
use Rector\Core\Configuration\CurrentNodeProvider;
|
||||||
use Rector\Core\Exception\NotImplementedYetException;
|
use Rector\Core\Exception\NotImplementedYetException;
|
||||||
use Rector\StaticTypeMapper\StaticTypeMapper;
|
use Rector\StaticTypeMapper\StaticTypeMapper;
|
||||||
use RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
use RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
||||||
/**
|
/**
|
||||||
* @template TNode as \PHPStan\PhpDocParser\Ast\Node
|
* @template TNode as \PHPStan\PhpDocParser\Ast\Node
|
||||||
* @see \Rector\Tests\BetterPhpDocParser\PhpDocInfo\PhpDocInfo\PhpDocInfoTest
|
* @see \Rector\Tests\BetterPhpDocParser\PhpDocInfo\PhpDocInfo\PhpDocInfoTest
|
||||||
@ -408,7 +408,7 @@ final class PhpDocInfo
|
|||||||
return \true;
|
return \true;
|
||||||
}
|
}
|
||||||
// has a single node with missing start_end
|
// has a single node with missing start_end
|
||||||
$phpDocNodeTraverser = new \RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
$phpDocNodeTraverser = new \RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||||
$changedPhpDocNodeVisitor = new \Rector\BetterPhpDocParser\PhpDocNodeVisitor\ChangedPhpDocNodeVisitor();
|
$changedPhpDocNodeVisitor = new \Rector\BetterPhpDocParser\PhpDocNodeVisitor\ChangedPhpDocNodeVisitor();
|
||||||
$phpDocNodeTraverser->addPhpDocNodeVisitor($changedPhpDocNodeVisitor);
|
$phpDocNodeTraverser->addPhpDocNodeVisitor($changedPhpDocNodeVisitor);
|
||||||
$phpDocNodeTraverser->traverse($this->phpDocNode);
|
$phpDocNodeTraverser->traverse($this->phpDocNode);
|
||||||
|
@ -6,7 +6,7 @@ namespace Rector\BetterPhpDocParser\PhpDocInfo;
|
|||||||
use PHPStan\PhpDocParser\Lexer\Lexer;
|
use PHPStan\PhpDocParser\Lexer\Lexer;
|
||||||
use PHPStan\PhpDocParser\Parser\TokenIterator;
|
use PHPStan\PhpDocParser\Parser\TokenIterator;
|
||||||
use Rector\BetterPhpDocParser\ValueObject\Parser\BetterTokenIterator;
|
use Rector\BetterPhpDocParser\ValueObject\Parser\BetterTokenIterator;
|
||||||
use RectorPrefix20210613\Symplify\PackageBuilder\Reflection\PrivatesAccessor;
|
use RectorPrefix20210614\Symplify\PackageBuilder\Reflection\PrivatesAccessor;
|
||||||
final class TokenIteratorFactory
|
final class TokenIteratorFactory
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -21,7 +21,7 @@ final class TokenIteratorFactory
|
|||||||
* @var \Symplify\PackageBuilder\Reflection\PrivatesAccessor
|
* @var \Symplify\PackageBuilder\Reflection\PrivatesAccessor
|
||||||
*/
|
*/
|
||||||
private $privatesAccessor;
|
private $privatesAccessor;
|
||||||
public function __construct(\PHPStan\PhpDocParser\Lexer\Lexer $lexer, \RectorPrefix20210613\Symplify\PackageBuilder\Reflection\PrivatesAccessor $privatesAccessor)
|
public function __construct(\PHPStan\PhpDocParser\Lexer\Lexer $lexer, \RectorPrefix20210614\Symplify\PackageBuilder\Reflection\PrivatesAccessor $privatesAccessor)
|
||||||
{
|
{
|
||||||
$this->lexer = $lexer;
|
$this->lexer = $lexer;
|
||||||
$this->privatesAccessor = $privatesAccessor;
|
$this->privatesAccessor = $privatesAccessor;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace Rector\BetterPhpDocParser\PhpDocManipulator;
|
namespace Rector\BetterPhpDocParser\PhpDocManipulator;
|
||||||
|
|
||||||
use RectorPrefix20210613\Nette\Utils\Strings;
|
use RectorPrefix20210614\Nette\Utils\Strings;
|
||||||
use PhpParser\Node;
|
use PhpParser\Node;
|
||||||
use Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode;
|
use Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode;
|
||||||
use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo;
|
use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo;
|
||||||
@ -79,7 +79,7 @@ final class PhpDocClassRenamer
|
|||||||
$doctrineAnnotationTagValueNode->changeSilentValue($newClass);
|
$doctrineAnnotationTagValueNode->changeSilentValue($newClass);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$newContent = \RectorPrefix20210613\Nette\Utils\Strings::replace($className, '#\\b' . \preg_quote($oldClass, '#') . '\\b#', $newClass);
|
$newContent = \RectorPrefix20210614\Nette\Utils\Strings::replace($className, '#\\b' . \preg_quote($oldClass, '#') . '\\b#', $newClass);
|
||||||
if ($newContent === $className) {
|
if ($newContent === $className) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -7,9 +7,9 @@ use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode;
|
|||||||
use Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface;
|
use Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface;
|
||||||
use Rector\BetterPhpDocParser\DataProvider\CurrentTokenIteratorProvider;
|
use Rector\BetterPhpDocParser\DataProvider\CurrentTokenIteratorProvider;
|
||||||
use Rector\BetterPhpDocParser\ValueObject\Parser\BetterTokenIterator;
|
use Rector\BetterPhpDocParser\ValueObject\Parser\BetterTokenIterator;
|
||||||
use RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
use RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
||||||
use RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\CloningPhpDocNodeVisitor;
|
use RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\CloningPhpDocNodeVisitor;
|
||||||
use RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\ParentConnectingPhpDocNodeVisitor;
|
use RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\ParentConnectingPhpDocNodeVisitor;
|
||||||
/**
|
/**
|
||||||
* @see \Rector\Tests\BetterPhpDocParser\PhpDocNodeMapperTest
|
* @see \Rector\Tests\BetterPhpDocParser\PhpDocNodeMapperTest
|
||||||
*/
|
*/
|
||||||
@ -34,7 +34,7 @@ final class PhpDocNodeMapper
|
|||||||
/**
|
/**
|
||||||
* @param BasePhpDocNodeVisitorInterface[] $phpDocNodeVisitors
|
* @param BasePhpDocNodeVisitorInterface[] $phpDocNodeVisitors
|
||||||
*/
|
*/
|
||||||
public function __construct(\Rector\BetterPhpDocParser\DataProvider\CurrentTokenIteratorProvider $currentTokenIteratorProvider, \RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\ParentConnectingPhpDocNodeVisitor $parentConnectingPhpDocNodeVisitor, \RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\CloningPhpDocNodeVisitor $cloningPhpDocNodeVisitor, array $phpDocNodeVisitors)
|
public function __construct(\Rector\BetterPhpDocParser\DataProvider\CurrentTokenIteratorProvider $currentTokenIteratorProvider, \RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\ParentConnectingPhpDocNodeVisitor $parentConnectingPhpDocNodeVisitor, \RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\CloningPhpDocNodeVisitor $cloningPhpDocNodeVisitor, array $phpDocNodeVisitors)
|
||||||
{
|
{
|
||||||
$this->currentTokenIteratorProvider = $currentTokenIteratorProvider;
|
$this->currentTokenIteratorProvider = $currentTokenIteratorProvider;
|
||||||
$this->parentConnectingPhpDocNodeVisitor = $parentConnectingPhpDocNodeVisitor;
|
$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
|
public function transform(\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode $phpDocNode, \Rector\BetterPhpDocParser\ValueObject\Parser\BetterTokenIterator $betterTokenIterator) : void
|
||||||
{
|
{
|
||||||
$this->currentTokenIteratorProvider->setBetterTokenIterator($betterTokenIterator);
|
$this->currentTokenIteratorProvider->setBetterTokenIterator($betterTokenIterator);
|
||||||
$parentPhpDocNodeTraverser = new \RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
$parentPhpDocNodeTraverser = new \RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||||
$parentPhpDocNodeTraverser->addPhpDocNodeVisitor($this->parentConnectingPhpDocNodeVisitor);
|
$parentPhpDocNodeTraverser->addPhpDocNodeVisitor($this->parentConnectingPhpDocNodeVisitor);
|
||||||
$parentPhpDocNodeTraverser->traverse($phpDocNode);
|
$parentPhpDocNodeTraverser->traverse($phpDocNode);
|
||||||
$cloningPhpDocNodeTraverser = new \RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
$cloningPhpDocNodeTraverser = new \RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||||
$cloningPhpDocNodeTraverser->addPhpDocNodeVisitor($this->cloningPhpDocNodeVisitor);
|
$cloningPhpDocNodeTraverser->addPhpDocNodeVisitor($this->cloningPhpDocNodeVisitor);
|
||||||
$cloningPhpDocNodeTraverser->traverse($phpDocNode);
|
$cloningPhpDocNodeTraverser->traverse($phpDocNode);
|
||||||
$phpDocNodeTraverser = new \RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
$phpDocNodeTraverser = new \RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||||
foreach ($this->phpDocNodeVisitors as $phpDocNodeVisitor) {
|
foreach ($this->phpDocNodeVisitors as $phpDocNodeVisitor) {
|
||||||
$phpDocNodeTraverser->addPhpDocNodeVisitor($phpDocNodeVisitor);
|
$phpDocNodeTraverser->addPhpDocNodeVisitor($phpDocNodeVisitor);
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ declare (strict_types=1);
|
|||||||
namespace Rector\BetterPhpDocParser\PhpDocNodeTraverser;
|
namespace Rector\BetterPhpDocParser\PhpDocNodeTraverser;
|
||||||
|
|
||||||
use Rector\BetterPhpDocParser\PhpDocNodeVisitor\ChangedPhpDocNodeVisitor;
|
use Rector\BetterPhpDocParser\PhpDocNodeVisitor\ChangedPhpDocNodeVisitor;
|
||||||
use RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
use RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
||||||
final class ChangedPhpDocNodeTraverserFactory
|
final class ChangedPhpDocNodeTraverserFactory
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -15,9 +15,9 @@ final class ChangedPhpDocNodeTraverserFactory
|
|||||||
{
|
{
|
||||||
$this->changedPhpDocNodeVisitor = $changedPhpDocNodeVisitor;
|
$this->changedPhpDocNodeVisitor = $changedPhpDocNodeVisitor;
|
||||||
}
|
}
|
||||||
public function create() : \RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeTraverser
|
public function create() : \RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeTraverser
|
||||||
{
|
{
|
||||||
$changedPhpDocNodeTraverser = new \RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
$changedPhpDocNodeTraverser = new \RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeTraverser();
|
||||||
$changedPhpDocNodeTraverser->addPhpDocNodeVisitor($this->changedPhpDocNodeVisitor);
|
$changedPhpDocNodeTraverser->addPhpDocNodeVisitor($this->changedPhpDocNodeVisitor);
|
||||||
return $changedPhpDocNodeTraverser;
|
return $changedPhpDocNodeTraverser;
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,8 @@ use PHPStan\PhpDocParser\Ast\Type\ArrayTypeNode;
|
|||||||
use Rector\BetterPhpDocParser\Attributes\AttributeMirrorer;
|
use Rector\BetterPhpDocParser\Attributes\AttributeMirrorer;
|
||||||
use Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface;
|
use Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface;
|
||||||
use Rector\BetterPhpDocParser\ValueObject\Type\SpacingAwareArrayTypeNode;
|
use Rector\BetterPhpDocParser\ValueObject\Type\SpacingAwareArrayTypeNode;
|
||||||
use RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
use RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||||
final class ArrayTypePhpDocNodeVisitor extends \RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
final class ArrayTypePhpDocNodeVisitor extends \RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var \Rector\BetterPhpDocParser\Attributes\AttributeMirrorer
|
* @var \Rector\BetterPhpDocParser\Attributes\AttributeMirrorer
|
||||||
|
@ -8,8 +8,8 @@ use PHPStan\PhpDocParser\Ast\Type\CallableTypeNode;
|
|||||||
use Rector\BetterPhpDocParser\Attributes\AttributeMirrorer;
|
use Rector\BetterPhpDocParser\Attributes\AttributeMirrorer;
|
||||||
use Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface;
|
use Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface;
|
||||||
use Rector\BetterPhpDocParser\ValueObject\Type\SpacingAwareCallableTypeNode;
|
use Rector\BetterPhpDocParser\ValueObject\Type\SpacingAwareCallableTypeNode;
|
||||||
use RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
use RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||||
final class CallableTypePhpDocNodeVisitor extends \RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
final class CallableTypePhpDocNodeVisitor extends \RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var \Rector\BetterPhpDocParser\Attributes\AttributeMirrorer
|
* @var \Rector\BetterPhpDocParser\Attributes\AttributeMirrorer
|
||||||
|
@ -5,8 +5,8 @@ namespace Rector\BetterPhpDocParser\PhpDocNodeVisitor;
|
|||||||
|
|
||||||
use PHPStan\PhpDocParser\Ast\Node;
|
use PHPStan\PhpDocParser\Ast\Node;
|
||||||
use Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey;
|
use Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey;
|
||||||
use RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
use RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||||
final class ChangedPhpDocNodeVisitor extends \RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor
|
final class ChangedPhpDocNodeVisitor extends \RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var bool
|
* @var bool
|
||||||
|
@ -8,8 +8,8 @@ use PHPStan\PhpDocParser\Ast\Type\IntersectionTypeNode;
|
|||||||
use Rector\BetterPhpDocParser\Attributes\AttributeMirrorer;
|
use Rector\BetterPhpDocParser\Attributes\AttributeMirrorer;
|
||||||
use Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface;
|
use Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface;
|
||||||
use Rector\BetterPhpDocParser\ValueObject\Type\BracketsAwareIntersectionTypeNode;
|
use Rector\BetterPhpDocParser\ValueObject\Type\BracketsAwareIntersectionTypeNode;
|
||||||
use RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
use RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||||
final class IntersectionTypeNodePhpDocNodeVisitor extends \RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
final class IntersectionTypeNodePhpDocNodeVisitor extends \RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var \Rector\BetterPhpDocParser\Attributes\AttributeMirrorer
|
* @var \Rector\BetterPhpDocParser\Attributes\AttributeMirrorer
|
||||||
|
@ -8,8 +8,8 @@ use PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode;
|
|||||||
use Rector\BetterPhpDocParser\Attributes\AttributeMirrorer;
|
use Rector\BetterPhpDocParser\Attributes\AttributeMirrorer;
|
||||||
use Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface;
|
use Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface;
|
||||||
use Rector\BetterPhpDocParser\ValueObject\PhpDoc\VariadicAwareParamTagValueNode;
|
use Rector\BetterPhpDocParser\ValueObject\PhpDoc\VariadicAwareParamTagValueNode;
|
||||||
use RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
use RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||||
final class ParamPhpDocNodeVisitor extends \RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
final class ParamPhpDocNodeVisitor extends \RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var \Rector\BetterPhpDocParser\Attributes\AttributeMirrorer
|
* @var \Rector\BetterPhpDocParser\Attributes\AttributeMirrorer
|
||||||
|
@ -14,8 +14,8 @@ use Rector\BetterPhpDocParser\ValueObject\PhpDoc\SpacingAwareTemplateTagValueNod
|
|||||||
use Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey;
|
use Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey;
|
||||||
use Rector\BetterPhpDocParser\ValueObject\StartAndEnd;
|
use Rector\BetterPhpDocParser\ValueObject\StartAndEnd;
|
||||||
use Rector\Core\Exception\ShouldNotHappenException;
|
use Rector\Core\Exception\ShouldNotHappenException;
|
||||||
use RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
use RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||||
final class TemplatePhpDocNodeVisitor extends \RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
final class TemplatePhpDocNodeVisitor extends \RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var \Rector\BetterPhpDocParser\DataProvider\CurrentTokenIteratorProvider
|
* @var \Rector\BetterPhpDocParser\DataProvider\CurrentTokenIteratorProvider
|
||||||
|
@ -14,8 +14,8 @@ use Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey;
|
|||||||
use Rector\BetterPhpDocParser\ValueObject\StartAndEnd;
|
use Rector\BetterPhpDocParser\ValueObject\StartAndEnd;
|
||||||
use Rector\BetterPhpDocParser\ValueObject\Type\BracketsAwareUnionTypeNode;
|
use Rector\BetterPhpDocParser\ValueObject\Type\BracketsAwareUnionTypeNode;
|
||||||
use Rector\Core\Exception\ShouldNotHappenException;
|
use Rector\Core\Exception\ShouldNotHappenException;
|
||||||
use RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
use RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor;
|
||||||
final class UnionTypeNodePhpDocNodeVisitor extends \RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
final class UnionTypeNodePhpDocNodeVisitor extends \RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor implements \Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var \Rector\BetterPhpDocParser\DataProvider\CurrentTokenIteratorProvider
|
* @var \Rector\BetterPhpDocParser\DataProvider\CurrentTokenIteratorProvider
|
||||||
|
@ -17,7 +17,7 @@ use Rector\BetterPhpDocParser\PhpDocInfo\TokenIteratorFactory;
|
|||||||
use Rector\BetterPhpDocParser\ValueObject\Parser\BetterTokenIterator;
|
use Rector\BetterPhpDocParser\ValueObject\Parser\BetterTokenIterator;
|
||||||
use Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey;
|
use Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey;
|
||||||
use Rector\BetterPhpDocParser\ValueObject\StartAndEnd;
|
use Rector\BetterPhpDocParser\ValueObject\StartAndEnd;
|
||||||
use RectorPrefix20210613\Symplify\PackageBuilder\Reflection\PrivatesCaller;
|
use RectorPrefix20210614\Symplify\PackageBuilder\Reflection\PrivatesCaller;
|
||||||
/**
|
/**
|
||||||
* @see \Rector\Tests\BetterPhpDocParser\PhpDocParser\TagValueNodeReprint\TagValueNodeReprintTest
|
* @see \Rector\Tests\BetterPhpDocParser\PhpDocParser\TagValueNodeReprint\TagValueNodeReprintTest
|
||||||
*/
|
*/
|
||||||
@ -40,7 +40,7 @@ final class BetterPhpDocParser extends \PHPStan\PhpDocParser\Parser\PhpDocParser
|
|||||||
$this->tokenIteratorFactory = $tokenIteratorFactory;
|
$this->tokenIteratorFactory = $tokenIteratorFactory;
|
||||||
$this->doctrineAnnotationDecorator = $doctrineAnnotationDecorator;
|
$this->doctrineAnnotationDecorator = $doctrineAnnotationDecorator;
|
||||||
parent::__construct($typeParser, $constExprParser);
|
parent::__construct($typeParser, $constExprParser);
|
||||||
$this->privatesCaller = new \RectorPrefix20210613\Symplify\PackageBuilder\Reflection\PrivatesCaller();
|
$this->privatesCaller = new \RectorPrefix20210614\Symplify\PackageBuilder\Reflection\PrivatesCaller();
|
||||||
}
|
}
|
||||||
public function parse(\PHPStan\PhpDocParser\Parser\TokenIterator $tokenIterator) : \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode
|
public function parse(\PHPStan\PhpDocParser\Parser\TokenIterator $tokenIterator) : \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace Rector\BetterPhpDocParser\PhpDocParser;
|
namespace Rector\BetterPhpDocParser\PhpDocParser;
|
||||||
|
|
||||||
use RectorPrefix20210613\Nette\Utils\Strings;
|
use RectorPrefix20210614\Nette\Utils\Strings;
|
||||||
use PhpParser\Node;
|
use PhpParser\Node;
|
||||||
use PhpParser\Node\Stmt\Use_;
|
use PhpParser\Node\Stmt\Use_;
|
||||||
use PhpParser\Node\Stmt\UseUse;
|
use PhpParser\Node\Stmt\UseUse;
|
||||||
@ -76,14 +76,14 @@ final class ClassAnnotationMatcher
|
|||||||
{
|
{
|
||||||
$shortName = $useUse->alias !== null ? $useUse->alias->name : $useUse->name->getLast();
|
$shortName = $useUse->alias !== null ? $useUse->alias->name : $useUse->name->getLast();
|
||||||
$shortNamePattern = \preg_quote($shortName, '#');
|
$shortNamePattern = \preg_quote($shortName, '#');
|
||||||
return (bool) \RectorPrefix20210613\Nette\Utils\Strings::match($tag, '#' . $shortNamePattern . '(\\\\[\\w]+)?#i');
|
return (bool) \RectorPrefix20210614\Nette\Utils\Strings::match($tag, '#' . $shortNamePattern . '(\\\\[\\w]+)?#i');
|
||||||
}
|
}
|
||||||
private function resolveName(string $tag, \PhpParser\Node\Stmt\UseUse $useUse) : string
|
private function resolveName(string $tag, \PhpParser\Node\Stmt\UseUse $useUse) : string
|
||||||
{
|
{
|
||||||
if ($useUse->alias === null) {
|
if ($useUse->alias === null) {
|
||||||
return $useUse->name->toString();
|
return $useUse->name->toString();
|
||||||
}
|
}
|
||||||
$unaliasedShortClass = \RectorPrefix20210613\Nette\Utils\Strings::substring($tag, \RectorPrefix20210613\Nette\Utils\Strings::length($useUse->alias->toString()));
|
$unaliasedShortClass = \RectorPrefix20210614\Nette\Utils\Strings::substring($tag, \RectorPrefix20210614\Nette\Utils\Strings::length($useUse->alias->toString()));
|
||||||
if (\strncmp($unaliasedShortClass, '\\', \strlen('\\')) === 0) {
|
if (\strncmp($unaliasedShortClass, '\\', \strlen('\\')) === 0) {
|
||||||
return $useUse->name . $unaliasedShortClass;
|
return $useUse->name . $unaliasedShortClass;
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ use Rector\BetterPhpDocParser\PhpDocParser\StaticDoctrineAnnotationParser;
|
|||||||
use Rector\BetterPhpDocParser\ValueObject\Parser\BetterTokenIterator;
|
use Rector\BetterPhpDocParser\ValueObject\Parser\BetterTokenIterator;
|
||||||
use Rector\Core\Configuration\CurrentNodeProvider;
|
use Rector\Core\Configuration\CurrentNodeProvider;
|
||||||
use Rector\Core\Exception\ShouldNotHappenException;
|
use Rector\Core\Exception\ShouldNotHappenException;
|
||||||
use RectorPrefix20210613\Symfony\Contracts\Service\Attribute\Required;
|
use RectorPrefix20210614\Symfony\Contracts\Service\Attribute\Required;
|
||||||
final class PlainValueParser
|
final class PlainValueParser
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace Rector\BetterPhpDocParser\Printer;
|
namespace Rector\BetterPhpDocParser\Printer;
|
||||||
|
|
||||||
use RectorPrefix20210613\Nette\Utils\Strings;
|
use RectorPrefix20210614\Nette\Utils\Strings;
|
||||||
final class DocBlockInliner
|
final class DocBlockInliner
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -18,7 +18,7 @@ final class DocBlockInliner
|
|||||||
private const NEWLINE_MIDDLE_DOC_REGEX = "#\n \\* #";
|
private const NEWLINE_MIDDLE_DOC_REGEX = "#\n \\* #";
|
||||||
public function inline(string $docContent) : string
|
public function inline(string $docContent) : string
|
||||||
{
|
{
|
||||||
$docContent = \RectorPrefix20210613\Nette\Utils\Strings::replace($docContent, self::NEWLINE_MIDDLE_DOC_REGEX, ' ');
|
$docContent = \RectorPrefix20210614\Nette\Utils\Strings::replace($docContent, self::NEWLINE_MIDDLE_DOC_REGEX, ' ');
|
||||||
return \RectorPrefix20210613\Nette\Utils\Strings::replace($docContent, self::NEWLINE_CLOSING_DOC_REGEX, ' */');
|
return \RectorPrefix20210614\Nette\Utils\Strings::replace($docContent, self::NEWLINE_CLOSING_DOC_REGEX, ' */');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace Rector\BetterPhpDocParser\Printer;
|
namespace Rector\BetterPhpDocParser\Printer;
|
||||||
|
|
||||||
use RectorPrefix20210613\Nette\Utils\Strings;
|
use RectorPrefix20210614\Nette\Utils\Strings;
|
||||||
use PhpParser\Node\Stmt\InlineHTML;
|
use PhpParser\Node\Stmt\InlineHTML;
|
||||||
use PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode;
|
use PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode;
|
||||||
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocChildNode;
|
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocChildNode;
|
||||||
@ -21,7 +21,7 @@ use Rector\BetterPhpDocParser\PhpDocNodeVisitor\ChangedPhpDocNodeVisitor;
|
|||||||
use Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey;
|
use Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey;
|
||||||
use Rector\BetterPhpDocParser\ValueObject\StartAndEnd;
|
use Rector\BetterPhpDocParser\ValueObject\StartAndEnd;
|
||||||
use Rector\Core\Exception\ShouldNotHappenException;
|
use Rector\Core\Exception\ShouldNotHappenException;
|
||||||
use RectorPrefix20210613\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
use RectorPrefix20210614\Symplify\SimplePhpDocParser\PhpDocNodeTraverser;
|
||||||
/**
|
/**
|
||||||
* @see \Rector\Tests\BetterPhpDocParser\PhpDocInfo\PhpDocInfoPrinter\PhpDocInfoPrinterTest
|
* @see \Rector\Tests\BetterPhpDocParser\PhpDocInfo\PhpDocInfoPrinter\PhpDocInfoPrinterTest
|
||||||
*/
|
*/
|
||||||
@ -140,7 +140,7 @@ final class PhpDocInfoPrinter
|
|||||||
$this->currentTokenPosition = 0;
|
$this->currentTokenPosition = 0;
|
||||||
$phpDocString = $this->printPhpDocNode($phpDocNode);
|
$phpDocString = $this->printPhpDocNode($phpDocNode);
|
||||||
// hotfix of extra space with callable ()
|
// hotfix of extra space with callable ()
|
||||||
return \RectorPrefix20210613\Nette\Utils\Strings::replace($phpDocString, self::CALLABLE_REGEX, 'callable(');
|
return \RectorPrefix20210614\Nette\Utils\Strings::replace($phpDocString, self::CALLABLE_REGEX, 'callable(');
|
||||||
}
|
}
|
||||||
public function getCurrentPhpDocInfo() : \Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo
|
public function getCurrentPhpDocInfo() : \Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo
|
||||||
{
|
{
|
||||||
@ -163,11 +163,11 @@ final class PhpDocInfoPrinter
|
|||||||
}
|
}
|
||||||
$output = $this->printEnd($output);
|
$output = $this->printEnd($output);
|
||||||
// fix missing start
|
// fix missing start
|
||||||
if (!\RectorPrefix20210613\Nette\Utils\Strings::match($output, self::DOCBLOCK_START_REGEX) && $output) {
|
if (!\RectorPrefix20210614\Nette\Utils\Strings::match($output, self::DOCBLOCK_START_REGEX) && $output) {
|
||||||
$output = '/**' . $output;
|
$output = '/**' . $output;
|
||||||
}
|
}
|
||||||
// fix missing end
|
// fix missing end
|
||||||
if (\RectorPrefix20210613\Nette\Utils\Strings::match($output, self::OPENING_DOCBLOCK_REGEX) && $output && !\RectorPrefix20210613\Nette\Utils\Strings::match($output, self::CLOSING_DOCBLOCK_REGEX)) {
|
if (\RectorPrefix20210614\Nette\Utils\Strings::match($output, self::OPENING_DOCBLOCK_REGEX) && $output && !\RectorPrefix20210614\Nette\Utils\Strings::match($output, self::CLOSING_DOCBLOCK_REGEX)) {
|
||||||
$output .= ' */';
|
$output .= ' */';
|
||||||
}
|
}
|
||||||
return $output;
|
return $output;
|
||||||
@ -189,7 +189,7 @@ final class PhpDocInfoPrinter
|
|||||||
if ($phpDocChildNode->value instanceof \Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode && $shouldReprintChildNode) {
|
if ($phpDocChildNode->value instanceof \Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode && $shouldReprintChildNode) {
|
||||||
$printedNode = (string) $phpDocChildNode;
|
$printedNode = (string) $phpDocChildNode;
|
||||||
// remove extra space between tags
|
// remove extra space between tags
|
||||||
$printedNode = \RectorPrefix20210613\Nette\Utils\Strings::replace($printedNode, self::TAG_AND_SPACE_REGEX, '$1(');
|
$printedNode = \RectorPrefix20210614\Nette\Utils\Strings::replace($printedNode, self::TAG_AND_SPACE_REGEX, '$1(');
|
||||||
return self::NEWLINE_WITH_ASTERISK . $printedNode;
|
return self::NEWLINE_WITH_ASTERISK . $printedNode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ namespace Rector\BetterPhpDocParser\ValueObject\Parser;
|
|||||||
|
|
||||||
use PHPStan\PhpDocParser\Parser\TokenIterator;
|
use PHPStan\PhpDocParser\Parser\TokenIterator;
|
||||||
use Rector\Core\Exception\ShouldNotHappenException;
|
use Rector\Core\Exception\ShouldNotHappenException;
|
||||||
use RectorPrefix20210613\Symplify\PackageBuilder\Reflection\PrivatesAccessor;
|
use RectorPrefix20210614\Symplify\PackageBuilder\Reflection\PrivatesAccessor;
|
||||||
final class BetterTokenIterator extends \PHPStan\PhpDocParser\Parser\TokenIterator
|
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)
|
public function __construct(array $tokens, int $index = 0)
|
||||||
{
|
{
|
||||||
$this->privatesAccessor = new \RectorPrefix20210613\Symplify\PackageBuilder\Reflection\PrivatesAccessor();
|
$this->privatesAccessor = new \RectorPrefix20210614\Symplify\PackageBuilder\Reflection\PrivatesAccessor();
|
||||||
if ($tokens === []) {
|
if ($tokens === []) {
|
||||||
$this->privatesAccessor->setPrivateProperty($this, self::TOKENS, []);
|
$this->privatesAccessor->setPrivateProperty($this, self::TOKENS, []);
|
||||||
$this->privatesAccessor->setPrivateProperty($this, self::INDEX, 0);
|
$this->privatesAccessor->setPrivateProperty($this, self::INDEX, 0);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace Rector\BetterPhpDocParser\ValueObject\PhpDoc\DoctrineAnnotation;
|
namespace Rector\BetterPhpDocParser\ValueObject\PhpDoc\DoctrineAnnotation;
|
||||||
|
|
||||||
use RectorPrefix20210613\Nette\Utils\Strings;
|
use RectorPrefix20210614\Nette\Utils\Strings;
|
||||||
use PHPStan\PhpDocParser\Ast\Node;
|
use PHPStan\PhpDocParser\Ast\Node;
|
||||||
use PHPStan\PhpDocParser\Ast\NodeAttributes;
|
use PHPStan\PhpDocParser\Ast\NodeAttributes;
|
||||||
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode;
|
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode;
|
||||||
@ -79,7 +79,7 @@ abstract class AbstractValuesAwareNode implements \PHPStan\PhpDocParser\Ast\PhpD
|
|||||||
{
|
{
|
||||||
// is quoted?
|
// is quoted?
|
||||||
if (isset($this->values[$key])) {
|
if (isset($this->values[$key])) {
|
||||||
$isQuoted = (bool) \RectorPrefix20210613\Nette\Utils\Strings::match($this->values[$key], self::UNQUOTED_VALUE_REGEX);
|
$isQuoted = (bool) \RectorPrefix20210614\Nette\Utils\Strings::match($this->values[$key], self::UNQUOTED_VALUE_REGEX);
|
||||||
if ($isQuoted) {
|
if ($isQuoted) {
|
||||||
$value = '"' . $value . '"';
|
$value = '"' . $value . '"';
|
||||||
}
|
}
|
||||||
@ -106,7 +106,7 @@ abstract class AbstractValuesAwareNode implements \PHPStan\PhpDocParser\Ast\PhpD
|
|||||||
public function changeSilentValue($value) : void
|
public function changeSilentValue($value) : void
|
||||||
{
|
{
|
||||||
// is quoted?
|
// is quoted?
|
||||||
$isQuoted = (bool) \RectorPrefix20210613\Nette\Utils\Strings::match($this->values[0], self::UNQUOTED_VALUE_REGEX);
|
$isQuoted = (bool) \RectorPrefix20210614\Nette\Utils\Strings::match($this->values[0], self::UNQUOTED_VALUE_REGEX);
|
||||||
if ($isQuoted) {
|
if ($isQuoted) {
|
||||||
$value = '"' . $value . '"';
|
$value = '"' . $value . '"';
|
||||||
}
|
}
|
||||||
@ -155,7 +155,7 @@ abstract class AbstractValuesAwareNode implements \PHPStan\PhpDocParser\Ast\PhpD
|
|||||||
if (!\is_string($value)) {
|
if (!\is_string($value)) {
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
$matches = \RectorPrefix20210613\Nette\Utils\Strings::match($value, self::UNQUOTED_VALUE_REGEX);
|
$matches = \RectorPrefix20210614\Nette\Utils\Strings::match($value, self::UNQUOTED_VALUE_REGEX);
|
||||||
if ($matches === null) {
|
if ($matches === null) {
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace Rector\BetterPhpDocParser\ValueObject;
|
namespace Rector\BetterPhpDocParser\ValueObject;
|
||||||
|
|
||||||
use RectorPrefix20210613\Symplify\SimplePhpDocParser\ValueObject\PhpDocAttributeKey as NativePhpDocAttributeKey;
|
use RectorPrefix20210614\Symplify\SimplePhpDocParser\ValueObject\PhpDocAttributeKey as NativePhpDocAttributeKey;
|
||||||
final class PhpDocAttributeKey
|
final class PhpDocAttributeKey
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -13,7 +13,7 @@ final class PhpDocAttributeKey
|
|||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public const PARENT = \RectorPrefix20210613\Symplify\SimplePhpDocParser\ValueObject\PhpDocAttributeKey::PARENT;
|
public const PARENT = \RectorPrefix20210614\Symplify\SimplePhpDocParser\ValueObject\PhpDocAttributeKey::PARENT;
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
@ -21,5 +21,5 @@ final class PhpDocAttributeKey
|
|||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public const ORIG_NODE = \RectorPrefix20210613\Symplify\SimplePhpDocParser\ValueObject\PhpDocAttributeKey::ORIG_NODE;
|
public const ORIG_NODE = \RectorPrefix20210614\Symplify\SimplePhpDocParser\ValueObject\PhpDocAttributeKey::ORIG_NODE;
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,8 @@ namespace Rector\Caching;
|
|||||||
|
|
||||||
use Rector\Caching\ValueObject\Storage\FileCacheStorage;
|
use Rector\Caching\ValueObject\Storage\FileCacheStorage;
|
||||||
use Rector\Core\Configuration\Option;
|
use Rector\Core\Configuration\Option;
|
||||||
use RectorPrefix20210613\Symplify\PackageBuilder\Parameter\ParameterProvider;
|
use RectorPrefix20210614\Symplify\PackageBuilder\Parameter\ParameterProvider;
|
||||||
use RectorPrefix20210613\Symplify\SmartFileSystem\SmartFileSystem;
|
use RectorPrefix20210614\Symplify\SmartFileSystem\SmartFileSystem;
|
||||||
final class CacheFactory
|
final class CacheFactory
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -17,7 +17,7 @@ final class CacheFactory
|
|||||||
* @var \Symplify\SmartFileSystem\SmartFileSystem
|
* @var \Symplify\SmartFileSystem\SmartFileSystem
|
||||||
*/
|
*/
|
||||||
private $smartFileSystem;
|
private $smartFileSystem;
|
||||||
public function __construct(\RectorPrefix20210613\Symplify\PackageBuilder\Parameter\ParameterProvider $parameterProvider, \RectorPrefix20210613\Symplify\SmartFileSystem\SmartFileSystem $smartFileSystem)
|
public function __construct(\RectorPrefix20210614\Symplify\PackageBuilder\Parameter\ParameterProvider $parameterProvider, \RectorPrefix20210614\Symplify\SmartFileSystem\SmartFileSystem $smartFileSystem)
|
||||||
{
|
{
|
||||||
$this->parameterProvider = $parameterProvider;
|
$this->parameterProvider = $parameterProvider;
|
||||||
$this->smartFileSystem = $smartFileSystem;
|
$this->smartFileSystem = $smartFileSystem;
|
||||||
|
@ -4,12 +4,12 @@ declare (strict_types=1);
|
|||||||
namespace Rector\Caching\Config;
|
namespace Rector\Caching\Config;
|
||||||
|
|
||||||
use Rector\Core\Exception\ShouldNotHappenException;
|
use Rector\Core\Exception\ShouldNotHappenException;
|
||||||
use RectorPrefix20210613\Symfony\Component\Config\FileLocator;
|
use RectorPrefix20210614\Symfony\Component\Config\FileLocator;
|
||||||
use RectorPrefix20210613\Symfony\Component\Config\Loader\LoaderInterface;
|
use RectorPrefix20210614\Symfony\Component\Config\Loader\LoaderInterface;
|
||||||
use RectorPrefix20210613\Symfony\Component\Config\Loader\LoaderResolver;
|
use RectorPrefix20210614\Symfony\Component\Config\Loader\LoaderResolver;
|
||||||
use RectorPrefix20210613\Symfony\Component\DependencyInjection\ContainerBuilder;
|
use RectorPrefix20210614\Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||||
use RectorPrefix20210613\Symfony\Component\DependencyInjection\Loader\GlobFileLoader;
|
use RectorPrefix20210614\Symfony\Component\DependencyInjection\Loader\GlobFileLoader;
|
||||||
use RectorPrefix20210613\Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
|
use RectorPrefix20210614\Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
|
||||||
use Symplify\SmartFileSystem\SmartFileInfo;
|
use Symplify\SmartFileSystem\SmartFileInfo;
|
||||||
/**
|
/**
|
||||||
* Inspired by https://github.com/symplify/easy-coding-standard/blob/e598ab54686e416788f28fcfe007fd08e0f371d9/packages/changed-files-detector/src/FileHashComputer.php
|
* Inspired by https://github.com/symplify/easy-coding-standard/blob/e598ab54686e416788f28fcfe007fd08e0f371d9/packages/changed-files-detector/src/FileHashComputer.php
|
||||||
@ -19,7 +19,7 @@ final class FileHashComputer
|
|||||||
public function compute(\Symplify\SmartFileSystem\SmartFileInfo $fileInfo) : string
|
public function compute(\Symplify\SmartFileSystem\SmartFileInfo $fileInfo) : string
|
||||||
{
|
{
|
||||||
$this->ensureIsPhp($fileInfo);
|
$this->ensureIsPhp($fileInfo);
|
||||||
$containerBuilder = new \RectorPrefix20210613\Symfony\Component\DependencyInjection\ContainerBuilder();
|
$containerBuilder = new \RectorPrefix20210614\Symfony\Component\DependencyInjection\ContainerBuilder();
|
||||||
$fileLoader = $this->createFileLoader($fileInfo, $containerBuilder);
|
$fileLoader = $this->createFileLoader($fileInfo, $containerBuilder);
|
||||||
$fileLoader->load($fileInfo->getRealPath());
|
$fileLoader->load($fileInfo->getRealPath());
|
||||||
$parameterBag = $containerBuilder->getParameterBag();
|
$parameterBag = $containerBuilder->getParameterBag();
|
||||||
@ -36,11 +36,11 @@ final class FileHashComputer
|
|||||||
$fileInfo->getRelativeFilePath()
|
$fileInfo->getRelativeFilePath()
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
private function createFileLoader(\Symplify\SmartFileSystem\SmartFileInfo $fileInfo, \RectorPrefix20210613\Symfony\Component\DependencyInjection\ContainerBuilder $containerBuilder) : \RectorPrefix20210613\Symfony\Component\Config\Loader\LoaderInterface
|
private function createFileLoader(\Symplify\SmartFileSystem\SmartFileInfo $fileInfo, \RectorPrefix20210614\Symfony\Component\DependencyInjection\ContainerBuilder $containerBuilder) : \RectorPrefix20210614\Symfony\Component\Config\Loader\LoaderInterface
|
||||||
{
|
{
|
||||||
$fileLocator = new \RectorPrefix20210613\Symfony\Component\Config\FileLocator([$fileInfo->getPath()]);
|
$fileLocator = new \RectorPrefix20210614\Symfony\Component\Config\FileLocator([$fileInfo->getPath()]);
|
||||||
$fileLoaders = [new \RectorPrefix20210613\Symfony\Component\DependencyInjection\Loader\GlobFileLoader($containerBuilder, $fileLocator), new \RectorPrefix20210613\Symfony\Component\DependencyInjection\Loader\PhpFileLoader($containerBuilder, $fileLocator)];
|
$fileLoaders = [new \RectorPrefix20210614\Symfony\Component\DependencyInjection\Loader\GlobFileLoader($containerBuilder, $fileLocator), new \RectorPrefix20210614\Symfony\Component\DependencyInjection\Loader\PhpFileLoader($containerBuilder, $fileLocator)];
|
||||||
$loaderResolver = new \RectorPrefix20210613\Symfony\Component\Config\Loader\LoaderResolver($fileLoaders);
|
$loaderResolver = new \RectorPrefix20210614\Symfony\Component\Config\Loader\LoaderResolver($fileLoaders);
|
||||||
$loader = $loaderResolver->resolve($fileInfo->getRealPath());
|
$loader = $loaderResolver->resolve($fileInfo->getRealPath());
|
||||||
if (!$loader) {
|
if (!$loader) {
|
||||||
throw new \Rector\Core\Exception\ShouldNotHappenException();
|
throw new \Rector\Core\Exception\ShouldNotHappenException();
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace Rector\Caching\Detector;
|
namespace Rector\Caching\Detector;
|
||||||
|
|
||||||
use RectorPrefix20210613\Nette\Utils\Strings;
|
use RectorPrefix20210614\Nette\Utils\Strings;
|
||||||
use Rector\Caching\Cache;
|
use Rector\Caching\Cache;
|
||||||
use Rector\Caching\Config\FileHashComputer;
|
use Rector\Caching\Config\FileHashComputer;
|
||||||
use Rector\Caching\Enum\CacheKey;
|
use Rector\Caching\Enum\CacheKey;
|
||||||
@ -93,7 +93,7 @@ final class ChangedFilesDetector
|
|||||||
}
|
}
|
||||||
private function storeConfigurationDataHash(\Symplify\SmartFileSystem\SmartFileInfo $fileInfo, string $configurationHash) : void
|
private function storeConfigurationDataHash(\Symplify\SmartFileSystem\SmartFileInfo $fileInfo, string $configurationHash) : void
|
||||||
{
|
{
|
||||||
$key = \Rector\Caching\Enum\CacheKey::CONFIGURATION_HASH_KEY . '_' . \RectorPrefix20210613\Nette\Utils\Strings::webalize($fileInfo->getRealPath());
|
$key = \Rector\Caching\Enum\CacheKey::CONFIGURATION_HASH_KEY . '_' . \RectorPrefix20210614\Nette\Utils\Strings::webalize($fileInfo->getRealPath());
|
||||||
$this->invalidateCacheIfConfigurationChanged($key, $configurationHash);
|
$this->invalidateCacheIfConfigurationChanged($key, $configurationHash);
|
||||||
$this->cache->save($key, \Rector\Caching\Enum\CacheKey::CONFIGURATION_HASH_KEY, $configurationHash);
|
$this->cache->save($key, \Rector\Caching\Enum\CacheKey::CONFIGURATION_HASH_KEY, $configurationHash);
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ use PHPStan\Analyser\MutatingScope;
|
|||||||
use PHPStan\Analyser\NodeScopeResolver;
|
use PHPStan\Analyser\NodeScopeResolver;
|
||||||
use PHPStan\Dependency\DependencyResolver as PHPStanDependencyResolver;
|
use PHPStan\Dependency\DependencyResolver as PHPStanDependencyResolver;
|
||||||
use PHPStan\File\FileHelper;
|
use PHPStan\File\FileHelper;
|
||||||
use RectorPrefix20210613\Symplify\PackageBuilder\Reflection\PrivatesAccessor;
|
use RectorPrefix20210614\Symplify\PackageBuilder\Reflection\PrivatesAccessor;
|
||||||
final class DependencyResolver
|
final class DependencyResolver
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -27,7 +27,7 @@ final class DependencyResolver
|
|||||||
* @var \Symplify\PackageBuilder\Reflection\PrivatesAccessor
|
* @var \Symplify\PackageBuilder\Reflection\PrivatesAccessor
|
||||||
*/
|
*/
|
||||||
private $privatesAccessor;
|
private $privatesAccessor;
|
||||||
public function __construct(\PHPStan\Analyser\NodeScopeResolver $nodeScopeResolver, \PHPStan\Dependency\DependencyResolver $phpStanDependencyResolver, \PHPStan\File\FileHelper $fileHelper, \RectorPrefix20210613\Symplify\PackageBuilder\Reflection\PrivatesAccessor $privatesAccessor)
|
public function __construct(\PHPStan\Analyser\NodeScopeResolver $nodeScopeResolver, \PHPStan\Dependency\DependencyResolver $phpStanDependencyResolver, \PHPStan\File\FileHelper $fileHelper, \RectorPrefix20210614\Symplify\PackageBuilder\Reflection\PrivatesAccessor $privatesAccessor)
|
||||||
{
|
{
|
||||||
$this->nodeScopeResolver = $nodeScopeResolver;
|
$this->nodeScopeResolver = $nodeScopeResolver;
|
||||||
$this->phpStanDependencyResolver = $phpStanDependencyResolver;
|
$this->phpStanDependencyResolver = $phpStanDependencyResolver;
|
||||||
|
@ -3,12 +3,12 @@
|
|||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace Rector\Caching\ValueObject\Storage;
|
namespace Rector\Caching\ValueObject\Storage;
|
||||||
|
|
||||||
use RectorPrefix20210613\Nette\Utils\Random;
|
use RectorPrefix20210614\Nette\Utils\Random;
|
||||||
use RectorPrefix20210613\Nette\Utils\Strings;
|
use RectorPrefix20210614\Nette\Utils\Strings;
|
||||||
use Rector\Caching\ValueObject\CacheFilePaths;
|
use Rector\Caching\ValueObject\CacheFilePaths;
|
||||||
use Rector\Caching\ValueObject\CacheItem;
|
use Rector\Caching\ValueObject\CacheItem;
|
||||||
use RectorPrefix20210613\Symplify\EasyCodingStandard\Caching\Exception\CachingException;
|
use RectorPrefix20210614\Symplify\EasyCodingStandard\Caching\Exception\CachingException;
|
||||||
use RectorPrefix20210613\Symplify\SmartFileSystem\SmartFileSystem;
|
use RectorPrefix20210614\Symplify\SmartFileSystem\SmartFileSystem;
|
||||||
/**
|
/**
|
||||||
* Inspired by
|
* Inspired by
|
||||||
* https://github.com/phpstan/phpstan-src/commit/4df7342f3a0aaef4bcd85456dd20ca88d38dd90d#diff-6dc14f6222bf150e6840ca44a7126653052a1cedc6a149b4e5c1e1a2c80eacdc
|
* https://github.com/phpstan/phpstan-src/commit/4df7342f3a0aaef4bcd85456dd20ca88d38dd90d#diff-6dc14f6222bf150e6840ca44a7126653052a1cedc6a149b4e5c1e1a2c80eacdc
|
||||||
@ -23,7 +23,7 @@ final class FileCacheStorage
|
|||||||
* @var \Symplify\SmartFileSystem\SmartFileSystem
|
* @var \Symplify\SmartFileSystem\SmartFileSystem
|
||||||
*/
|
*/
|
||||||
private $smartFileSystem;
|
private $smartFileSystem;
|
||||||
public function __construct(string $directory, \RectorPrefix20210613\Symplify\SmartFileSystem\SmartFileSystem $smartFileSystem)
|
public function __construct(string $directory, \RectorPrefix20210614\Symplify\SmartFileSystem\SmartFileSystem $smartFileSystem)
|
||||||
{
|
{
|
||||||
$this->directory = $directory;
|
$this->directory = $directory;
|
||||||
$this->smartFileSystem = $smartFileSystem;
|
$this->smartFileSystem = $smartFileSystem;
|
||||||
@ -55,13 +55,13 @@ final class FileCacheStorage
|
|||||||
$cacheFilePaths = $this->getCacheFilePaths($key);
|
$cacheFilePaths = $this->getCacheFilePaths($key);
|
||||||
$this->smartFileSystem->mkdir($cacheFilePaths->getFirstDirectory());
|
$this->smartFileSystem->mkdir($cacheFilePaths->getFirstDirectory());
|
||||||
$this->smartFileSystem->mkdir($cacheFilePaths->getSecondDirectory());
|
$this->smartFileSystem->mkdir($cacheFilePaths->getSecondDirectory());
|
||||||
$tmpPath = \sprintf('%s/%s.tmp', $this->directory, \RectorPrefix20210613\Nette\Utils\Random::generate());
|
$tmpPath = \sprintf('%s/%s.tmp', $this->directory, \RectorPrefix20210614\Nette\Utils\Random::generate());
|
||||||
$errorBefore = \error_get_last();
|
$errorBefore = \error_get_last();
|
||||||
$exported = @\var_export(new \Rector\Caching\ValueObject\CacheItem($variableKey, $data), \true);
|
$exported = @\var_export(new \Rector\Caching\ValueObject\CacheItem($variableKey, $data), \true);
|
||||||
$errorAfter = \error_get_last();
|
$errorAfter = \error_get_last();
|
||||||
if ($errorAfter !== null && $errorBefore !== $errorAfter) {
|
if ($errorAfter !== null && $errorBefore !== $errorAfter) {
|
||||||
$errorMessage = \sprintf('Error occurred while saving item "%s" ("%s") to cache: "%s"', $key, $variableKey, $errorAfter['message']);
|
$errorMessage = \sprintf('Error occurred while saving item "%s" ("%s") to cache: "%s"', $key, $variableKey, $errorAfter['message']);
|
||||||
throw new \RectorPrefix20210613\Symplify\EasyCodingStandard\Caching\Exception\CachingException($errorMessage);
|
throw new \RectorPrefix20210614\Symplify\EasyCodingStandard\Caching\Exception\CachingException($errorMessage);
|
||||||
}
|
}
|
||||||
$variableFileContent = \sprintf("<?php declare(strict_types = 1);\n\nreturn %s;", $exported);
|
$variableFileContent = \sprintf("<?php declare(strict_types = 1);\n\nreturn %s;", $exported);
|
||||||
$this->smartFileSystem->dumpFile($tmpPath, $variableFileContent);
|
$this->smartFileSystem->dumpFile($tmpPath, $variableFileContent);
|
||||||
@ -80,8 +80,8 @@ final class FileCacheStorage
|
|||||||
private function getCacheFilePaths(string $key) : \Rector\Caching\ValueObject\CacheFilePaths
|
private function getCacheFilePaths(string $key) : \Rector\Caching\ValueObject\CacheFilePaths
|
||||||
{
|
{
|
||||||
$keyHash = \sha1($key);
|
$keyHash = \sha1($key);
|
||||||
$firstDirectory = \sprintf('%s/%s', $this->directory, \RectorPrefix20210613\Nette\Utils\Strings::substring($keyHash, 0, 2));
|
$firstDirectory = \sprintf('%s/%s', $this->directory, \RectorPrefix20210614\Nette\Utils\Strings::substring($keyHash, 0, 2));
|
||||||
$secondDirectory = \sprintf('%s/%s', $firstDirectory, \RectorPrefix20210613\Nette\Utils\Strings::substring($keyHash, 2, 2));
|
$secondDirectory = \sprintf('%s/%s', $firstDirectory, \RectorPrefix20210614\Nette\Utils\Strings::substring($keyHash, 2, 2));
|
||||||
$filePath = \sprintf('%s/%s.php', $secondDirectory, $keyHash);
|
$filePath = \sprintf('%s/%s.php', $secondDirectory, $keyHash);
|
||||||
return new \Rector\Caching\ValueObject\CacheFilePaths($firstDirectory, $secondDirectory, $filePath);
|
return new \Rector\Caching\ValueObject\CacheFilePaths($firstDirectory, $secondDirectory, $filePath);
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace Rector\ChangesReporting\Annotation;
|
namespace Rector\ChangesReporting\Annotation;
|
||||||
|
|
||||||
use RectorPrefix20210613\Nette\Utils\Strings;
|
use RectorPrefix20210614\Nette\Utils\Strings;
|
||||||
use Rector\Core\Contract\Rector\RectorInterface;
|
use Rector\Core\Contract\Rector\RectorInterface;
|
||||||
use ReflectionClass;
|
use ReflectionClass;
|
||||||
/**
|
/**
|
||||||
@ -24,7 +24,7 @@ final class AnnotationExtractor
|
|||||||
// @see https://3v4l.org/ouYfB
|
// @see https://3v4l.org/ouYfB
|
||||||
// uses 'r?\n' instead of '$' because windows compat
|
// uses 'r?\n' instead of '$' because windows compat
|
||||||
$pattern = '#' . \preg_quote($annotation, '#') . '\\s+(?<content>.*?)\\r?\\n#m';
|
$pattern = '#' . \preg_quote($annotation, '#') . '\\s+(?<content>.*?)\\r?\\n#m';
|
||||||
$matches = \RectorPrefix20210613\Nette\Utils\Strings::match($docComment, $pattern);
|
$matches = \RectorPrefix20210614\Nette\Utils\Strings::match($docComment, $pattern);
|
||||||
return $matches['content'] ?? null;
|
return $matches['content'] ?? null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace Rector\ChangesReporting\Output;
|
namespace Rector\ChangesReporting\Output;
|
||||||
|
|
||||||
use RectorPrefix20210613\Nette\Utils\Strings;
|
use RectorPrefix20210614\Nette\Utils\Strings;
|
||||||
use Rector\ChangesReporting\Annotation\RectorsChangelogResolver;
|
use Rector\ChangesReporting\Annotation\RectorsChangelogResolver;
|
||||||
use Rector\ChangesReporting\Contract\Output\OutputFormatterInterface;
|
use Rector\ChangesReporting\Contract\Output\OutputFormatterInterface;
|
||||||
use Rector\Core\Configuration\Configuration;
|
use Rector\Core\Configuration\Configuration;
|
||||||
@ -119,8 +119,8 @@ final class ConsoleOutputFormatter implements \Rector\ChangesReporting\Contract\
|
|||||||
private function normalizePathsToRelativeWithLine(string $errorMessage) : string
|
private function normalizePathsToRelativeWithLine(string $errorMessage) : string
|
||||||
{
|
{
|
||||||
$regex = '#' . \preg_quote(\getcwd(), '#') . '/#';
|
$regex = '#' . \preg_quote(\getcwd(), '#') . '/#';
|
||||||
$errorMessage = \RectorPrefix20210613\Nette\Utils\Strings::replace($errorMessage, $regex, '');
|
$errorMessage = \RectorPrefix20210614\Nette\Utils\Strings::replace($errorMessage, $regex, '');
|
||||||
return \RectorPrefix20210613\Nette\Utils\Strings::replace($errorMessage, self::ON_LINE_REGEX, ':');
|
return \RectorPrefix20210614\Nette\Utils\Strings::replace($errorMessage, self::ON_LINE_REGEX, ':');
|
||||||
}
|
}
|
||||||
private function reportRemovedNodes(\Rector\Core\ValueObject\ProcessResult $processResult) : void
|
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());
|
$rectorsChangelogs = $this->rectorsChangelogResolver->resolveIncludingMissing($fileDiff->getRectorClasses());
|
||||||
$rectorsChangelogsLines = [];
|
$rectorsChangelogsLines = [];
|
||||||
foreach ($rectorsChangelogs as $rectorClass => $changelog) {
|
foreach ($rectorsChangelogs as $rectorClass => $changelog) {
|
||||||
$rectorShortClass = (string) \RectorPrefix20210613\Nette\Utils\Strings::after($rectorClass, '\\', -1);
|
$rectorShortClass = (string) \RectorPrefix20210614\Nette\Utils\Strings::after($rectorClass, '\\', -1);
|
||||||
$rectorsChangelogsLines[] = $changelog === null ? $rectorShortClass : $rectorShortClass . ' (' . $changelog . ')';
|
$rectorsChangelogsLines[] = $changelog === null ? $rectorShortClass : $rectorShortClass . ' (' . $changelog . ')';
|
||||||
}
|
}
|
||||||
return $rectorsChangelogsLines;
|
return $rectorsChangelogsLines;
|
||||||
|
@ -3,12 +3,12 @@
|
|||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace Rector\ChangesReporting\Output;
|
namespace Rector\ChangesReporting\Output;
|
||||||
|
|
||||||
use RectorPrefix20210613\Nette\Utils\Json;
|
use RectorPrefix20210614\Nette\Utils\Json;
|
||||||
use Rector\ChangesReporting\Annotation\RectorsChangelogResolver;
|
use Rector\ChangesReporting\Annotation\RectorsChangelogResolver;
|
||||||
use Rector\ChangesReporting\Contract\Output\OutputFormatterInterface;
|
use Rector\ChangesReporting\Contract\Output\OutputFormatterInterface;
|
||||||
use Rector\Core\Configuration\Configuration;
|
use Rector\Core\Configuration\Configuration;
|
||||||
use Rector\Core\ValueObject\ProcessResult;
|
use Rector\Core\ValueObject\ProcessResult;
|
||||||
use RectorPrefix20210613\Symplify\SmartFileSystem\SmartFileSystem;
|
use RectorPrefix20210614\Symplify\SmartFileSystem\SmartFileSystem;
|
||||||
final class JsonOutputFormatter implements \Rector\ChangesReporting\Contract\Output\OutputFormatterInterface
|
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
|
* @var \Rector\ChangesReporting\Annotation\RectorsChangelogResolver
|
||||||
*/
|
*/
|
||||||
private $rectorsChangelogResolver;
|
private $rectorsChangelogResolver;
|
||||||
public function __construct(\Rector\Core\Configuration\Configuration $configuration, \RectorPrefix20210613\Symplify\SmartFileSystem\SmartFileSystem $smartFileSystem, \Rector\ChangesReporting\Annotation\RectorsChangelogResolver $rectorsChangelogResolver)
|
public function __construct(\Rector\Core\Configuration\Configuration $configuration, \RectorPrefix20210614\Symplify\SmartFileSystem\SmartFileSystem $smartFileSystem, \Rector\ChangesReporting\Annotation\RectorsChangelogResolver $rectorsChangelogResolver)
|
||||||
{
|
{
|
||||||
$this->configuration = $configuration;
|
$this->configuration = $configuration;
|
||||||
$this->smartFileSystem = $smartFileSystem;
|
$this->smartFileSystem = $smartFileSystem;
|
||||||
@ -55,7 +55,7 @@ final class JsonOutputFormatter implements \Rector\ChangesReporting\Contract\Out
|
|||||||
if ($errorsData !== []) {
|
if ($errorsData !== []) {
|
||||||
$errorsArray['errors'] = $errorsData;
|
$errorsArray['errors'] = $errorsData;
|
||||||
}
|
}
|
||||||
$json = \RectorPrefix20210613\Nette\Utils\Json::encode($errorsArray, \RectorPrefix20210613\Nette\Utils\Json::PRETTY);
|
$json = \RectorPrefix20210614\Nette\Utils\Json::encode($errorsArray, \RectorPrefix20210614\Nette\Utils\Json::PRETTY);
|
||||||
$outputFile = $this->configuration->getOutputFile();
|
$outputFile = $this->configuration->getOutputFile();
|
||||||
if ($outputFile !== null) {
|
if ($outputFile !== null) {
|
||||||
$this->smartFileSystem->dumpFile($outputFile, $json . \PHP_EOL);
|
$this->smartFileSystem->dumpFile($outputFile, $json . \PHP_EOL);
|
||||||
|
@ -6,7 +6,7 @@ namespace Rector\ChangesReporting\ValueObjectFactory;
|
|||||||
use Rector\Core\Differ\DefaultDiffer;
|
use Rector\Core\Differ\DefaultDiffer;
|
||||||
use Rector\Core\ValueObject\Application\File;
|
use Rector\Core\ValueObject\Application\File;
|
||||||
use Rector\Core\ValueObject\Reporting\FileDiff;
|
use Rector\Core\ValueObject\Reporting\FileDiff;
|
||||||
use RectorPrefix20210613\Symplify\ConsoleColorDiff\Console\Output\ConsoleDiffer;
|
use RectorPrefix20210614\Symplify\ConsoleColorDiff\Console\Output\ConsoleDiffer;
|
||||||
final class FileDiffFactory
|
final class FileDiffFactory
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -17,7 +17,7 @@ final class FileDiffFactory
|
|||||||
* @var \Symplify\ConsoleColorDiff\Console\Output\ConsoleDiffer
|
* @var \Symplify\ConsoleColorDiff\Console\Output\ConsoleDiffer
|
||||||
*/
|
*/
|
||||||
private $consoleDiffer;
|
private $consoleDiffer;
|
||||||
public function __construct(\Rector\Core\Differ\DefaultDiffer $defaultDiffer, \RectorPrefix20210613\Symplify\ConsoleColorDiff\Console\Output\ConsoleDiffer $consoleDiffer)
|
public function __construct(\Rector\Core\Differ\DefaultDiffer $defaultDiffer, \RectorPrefix20210614\Symplify\ConsoleColorDiff\Console\Output\ConsoleDiffer $consoleDiffer)
|
||||||
{
|
{
|
||||||
$this->defaultDiffer = $defaultDiffer;
|
$this->defaultDiffer = $defaultDiffer;
|
||||||
$this->consoleDiffer = $consoleDiffer;
|
$this->consoleDiffer = $consoleDiffer;
|
||||||
|
@ -5,7 +5,7 @@ namespace Rector\FamilyTree\Reflection;
|
|||||||
|
|
||||||
use PHPStan\Reflection\ClassReflection;
|
use PHPStan\Reflection\ClassReflection;
|
||||||
use PHPStan\Reflection\ReflectionProvider;
|
use PHPStan\Reflection\ReflectionProvider;
|
||||||
use RectorPrefix20210613\Symplify\PackageBuilder\Reflection\PrivatesAccessor;
|
use RectorPrefix20210614\Symplify\PackageBuilder\Reflection\PrivatesAccessor;
|
||||||
final class FamilyRelationsAnalyzer
|
final class FamilyRelationsAnalyzer
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -16,7 +16,7 @@ final class FamilyRelationsAnalyzer
|
|||||||
* @var \Symplify\PackageBuilder\Reflection\PrivatesAccessor
|
* @var \Symplify\PackageBuilder\Reflection\PrivatesAccessor
|
||||||
*/
|
*/
|
||||||
private $privatesAccessor;
|
private $privatesAccessor;
|
||||||
public function __construct(\PHPStan\Reflection\ReflectionProvider $reflectionProvider, \RectorPrefix20210613\Symplify\PackageBuilder\Reflection\PrivatesAccessor $privatesAccessor)
|
public function __construct(\PHPStan\Reflection\ReflectionProvider $reflectionProvider, \RectorPrefix20210614\Symplify\PackageBuilder\Reflection\PrivatesAccessor $privatesAccessor)
|
||||||
{
|
{
|
||||||
$this->reflectionProvider = $reflectionProvider;
|
$this->reflectionProvider = $reflectionProvider;
|
||||||
$this->privatesAccessor = $privatesAccessor;
|
$this->privatesAccessor = $privatesAccessor;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace Rector\FileFormatter\EditorConfig;
|
namespace Rector\FileFormatter\EditorConfig;
|
||||||
|
|
||||||
use RectorPrefix20210613\Idiosyncratic\EditorConfig\EditorConfig;
|
use RectorPrefix20210614\Idiosyncratic\EditorConfig\EditorConfig;
|
||||||
use Rector\Core\ValueObject\Application\File;
|
use Rector\Core\ValueObject\Application\File;
|
||||||
use Rector\FileFormatter\ValueObject\EditorConfigConfiguration;
|
use Rector\FileFormatter\ValueObject\EditorConfigConfiguration;
|
||||||
use Rector\FileFormatter\ValueObject\EditorConfigOption;
|
use Rector\FileFormatter\ValueObject\EditorConfigOption;
|
||||||
@ -17,7 +17,7 @@ final class EditorConfigParser
|
|||||||
* @var \Idiosyncratic\EditorConfig\EditorConfig
|
* @var \Idiosyncratic\EditorConfig\EditorConfig
|
||||||
*/
|
*/
|
||||||
private $editorConfig;
|
private $editorConfig;
|
||||||
public function __construct(\RectorPrefix20210613\Idiosyncratic\EditorConfig\EditorConfig $editorConfig)
|
public function __construct(\RectorPrefix20210614\Idiosyncratic\EditorConfig\EditorConfig $editorConfig)
|
||||||
{
|
{
|
||||||
$this->editorConfig = $editorConfig;
|
$this->editorConfig = $editorConfig;
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ use Rector\FileFormatter\ValueObject\EditorConfigConfiguration;
|
|||||||
use Rector\FileFormatter\ValueObject\Indent;
|
use Rector\FileFormatter\ValueObject\Indent;
|
||||||
use Rector\FileFormatter\ValueObject\NewLine;
|
use Rector\FileFormatter\ValueObject\NewLine;
|
||||||
use Rector\FileFormatter\ValueObjectFactory\EditorConfigConfigurationBuilder;
|
use Rector\FileFormatter\ValueObjectFactory\EditorConfigConfigurationBuilder;
|
||||||
use RectorPrefix20210613\Symplify\PackageBuilder\Parameter\ParameterProvider;
|
use RectorPrefix20210614\Symplify\PackageBuilder\Parameter\ParameterProvider;
|
||||||
final class FileFormatter
|
final class FileFormatter
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -31,7 +31,7 @@ final class FileFormatter
|
|||||||
/**
|
/**
|
||||||
* @param FileFormatterInterface[] $fileFormatters
|
* @param FileFormatterInterface[] $fileFormatters
|
||||||
*/
|
*/
|
||||||
public function __construct(\Rector\FileFormatter\EditorConfig\EditorConfigParser $editorConfigParser, \RectorPrefix20210613\Symplify\PackageBuilder\Parameter\ParameterProvider $parameterProvider, array $fileFormatters = [])
|
public function __construct(\Rector\FileFormatter\EditorConfig\EditorConfigParser $editorConfigParser, \RectorPrefix20210614\Symplify\PackageBuilder\Parameter\ParameterProvider $parameterProvider, array $fileFormatters = [])
|
||||||
{
|
{
|
||||||
$this->editorConfigParser = $editorConfigParser;
|
$this->editorConfigParser = $editorConfigParser;
|
||||||
$this->parameterProvider = $parameterProvider;
|
$this->parameterProvider = $parameterProvider;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace Rector\FileFormatter\Formatter;
|
namespace Rector\FileFormatter\Formatter;
|
||||||
|
|
||||||
use RectorPrefix20210613\Ergebnis\Json\Printer\PrinterInterface;
|
use RectorPrefix20210614\Ergebnis\Json\Printer\PrinterInterface;
|
||||||
use Rector\Core\ValueObject\Application\File;
|
use Rector\Core\ValueObject\Application\File;
|
||||||
use Rector\FileFormatter\Contract\Formatter\FileFormatterInterface;
|
use Rector\FileFormatter\Contract\Formatter\FileFormatterInterface;
|
||||||
use Rector\FileFormatter\ValueObject\EditorConfigConfiguration;
|
use Rector\FileFormatter\ValueObject\EditorConfigConfiguration;
|
||||||
@ -18,7 +18,7 @@ final class JsonFileFormatter implements \Rector\FileFormatter\Contract\Formatte
|
|||||||
* @var \Ergebnis\Json\Printer\PrinterInterface
|
* @var \Ergebnis\Json\Printer\PrinterInterface
|
||||||
*/
|
*/
|
||||||
private $jsonPrinter;
|
private $jsonPrinter;
|
||||||
public function __construct(\RectorPrefix20210613\Ergebnis\Json\Printer\PrinterInterface $jsonPrinter)
|
public function __construct(\RectorPrefix20210614\Ergebnis\Json\Printer\PrinterInterface $jsonPrinter)
|
||||||
{
|
{
|
||||||
$this->jsonPrinter = $jsonPrinter;
|
$this->jsonPrinter = $jsonPrinter;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace Rector\FileFormatter\Formatter;
|
namespace Rector\FileFormatter\Formatter;
|
||||||
|
|
||||||
use RectorPrefix20210613\Nette\Utils\Strings;
|
use RectorPrefix20210614\Nette\Utils\Strings;
|
||||||
use Rector\Core\ValueObject\Application\File;
|
use Rector\Core\ValueObject\Application\File;
|
||||||
use Rector\FileFormatter\Contract\Formatter\FileFormatterInterface;
|
use Rector\FileFormatter\Contract\Formatter\FileFormatterInterface;
|
||||||
use Rector\FileFormatter\ValueObject\EditorConfigConfiguration;
|
use Rector\FileFormatter\ValueObject\EditorConfigConfiguration;
|
||||||
@ -82,7 +82,7 @@ final class XmlFileFormatter implements \Rector\FileFormatter\Contract\Formatter
|
|||||||
*/
|
*/
|
||||||
private function getXmlParts(string $xml) : array
|
private function getXmlParts(string $xml) : array
|
||||||
{
|
{
|
||||||
$withNewLines = \RectorPrefix20210613\Nette\Utils\Strings::replace(\trim($xml), self::XML_PARTS_REGEX, "\$1\n\$2\$3");
|
$withNewLines = \RectorPrefix20210614\Nette\Utils\Strings::replace(\trim($xml), self::XML_PARTS_REGEX, "\$1\n\$2\$3");
|
||||||
return \explode("\n", $withNewLines);
|
return \explode("\n", $withNewLines);
|
||||||
}
|
}
|
||||||
private function getOutputForPart(string $part, \Rector\FileFormatter\ValueObject\EditorConfigConfiguration $editorConfigConfiguration) : string
|
private function getOutputForPart(string $part, \Rector\FileFormatter\ValueObject\EditorConfigConfiguration $editorConfigConfiguration) : string
|
||||||
@ -122,11 +122,11 @@ final class XmlFileFormatter implements \Rector\FileFormatter\Contract\Formatter
|
|||||||
}
|
}
|
||||||
private function isOpeningTag(string $part) : bool
|
private function isOpeningTag(string $part) : bool
|
||||||
{
|
{
|
||||||
return (bool) \RectorPrefix20210613\Nette\Utils\Strings::match($part, self::IS_OPENING_TAG_REGEX);
|
return (bool) \RectorPrefix20210614\Nette\Utils\Strings::match($part, self::IS_OPENING_TAG_REGEX);
|
||||||
}
|
}
|
||||||
private function isClosingTag(string $part) : bool
|
private function isClosingTag(string $part) : bool
|
||||||
{
|
{
|
||||||
return (bool) \RectorPrefix20210613\Nette\Utils\Strings::match($part, self::IS_CLOSING_TAG_REGEX);
|
return (bool) \RectorPrefix20210614\Nette\Utils\Strings::match($part, self::IS_CLOSING_TAG_REGEX);
|
||||||
}
|
}
|
||||||
private function isOpeningCdataTag(string $part) : bool
|
private function isOpeningCdataTag(string $part) : bool
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@ use Rector\FileFormatter\Contract\Formatter\FileFormatterInterface;
|
|||||||
use Rector\FileFormatter\ValueObject\EditorConfigConfiguration;
|
use Rector\FileFormatter\ValueObject\EditorConfigConfiguration;
|
||||||
use Rector\FileFormatter\ValueObject\Indent;
|
use Rector\FileFormatter\ValueObject\Indent;
|
||||||
use Rector\FileFormatter\ValueObjectFactory\EditorConfigConfigurationBuilder;
|
use Rector\FileFormatter\ValueObjectFactory\EditorConfigConfigurationBuilder;
|
||||||
use RectorPrefix20210613\Symfony\Component\Yaml\Yaml;
|
use RectorPrefix20210614\Symfony\Component\Yaml\Yaml;
|
||||||
/**
|
/**
|
||||||
* @see \Rector\Tests\FileFormatter\Formatter\YamlFileFormatter\YamlFileFormatterTest
|
* @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
|
public function format(\Rector\Core\ValueObject\Application\File $file, \Rector\FileFormatter\ValueObject\EditorConfigConfiguration $editorConfigConfiguration) : void
|
||||||
{
|
{
|
||||||
$yaml = \RectorPrefix20210613\Symfony\Component\Yaml\Yaml::parse($file->getFileContent());
|
$yaml = \RectorPrefix20210614\Symfony\Component\Yaml\Yaml::parse($file->getFileContent());
|
||||||
$newFileContent = \RectorPrefix20210613\Symfony\Component\Yaml\Yaml::dump($yaml, 99, $editorConfigConfiguration->getIndentSize());
|
$newFileContent = \RectorPrefix20210614\Symfony\Component\Yaml\Yaml::dump($yaml, 99, $editorConfigConfiguration->getIndentSize());
|
||||||
$file->changeFileContent($newFileContent);
|
$file->changeFileContent($newFileContent);
|
||||||
}
|
}
|
||||||
public function createDefaultEditorConfigConfigurationBuilder() : \Rector\FileFormatter\ValueObjectFactory\EditorConfigConfigurationBuilder
|
public function createDefaultEditorConfigConfigurationBuilder() : \Rector\FileFormatter\ValueObjectFactory\EditorConfigConfigurationBuilder
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace Rector\FileFormatter\ValueObject;
|
namespace Rector\FileFormatter\ValueObject;
|
||||||
|
|
||||||
use RectorPrefix20210613\Nette\Utils\Strings;
|
use RectorPrefix20210614\Nette\Utils\Strings;
|
||||||
use Rector\FileFormatter\Exception\InvalidIndentSizeException;
|
use Rector\FileFormatter\Exception\InvalidIndentSizeException;
|
||||||
use Rector\FileFormatter\Exception\InvalidIndentStringException;
|
use Rector\FileFormatter\Exception\InvalidIndentStringException;
|
||||||
use Rector\FileFormatter\Exception\InvalidIndentStyleException;
|
use Rector\FileFormatter\Exception\InvalidIndentStyleException;
|
||||||
@ -57,7 +57,7 @@ final class Indent
|
|||||||
*/
|
*/
|
||||||
public static function fromString(string $content)
|
public static function fromString(string $content)
|
||||||
{
|
{
|
||||||
$match = \RectorPrefix20210613\Nette\Utils\Strings::match($content, self::VALID_INDENT_REGEX);
|
$match = \RectorPrefix20210614\Nette\Utils\Strings::match($content, self::VALID_INDENT_REGEX);
|
||||||
if ($match === null) {
|
if ($match === null) {
|
||||||
throw \Rector\FileFormatter\Exception\InvalidIndentStringException::fromString($content);
|
throw \Rector\FileFormatter\Exception\InvalidIndentStringException::fromString($content);
|
||||||
}
|
}
|
||||||
@ -96,7 +96,7 @@ final class Indent
|
|||||||
*/
|
*/
|
||||||
public static function fromContent(string $content)
|
public static function fromContent(string $content)
|
||||||
{
|
{
|
||||||
$match = \RectorPrefix20210613\Nette\Utils\Strings::match($content, self::PARSE_INDENT_REGEX);
|
$match = \RectorPrefix20210614\Nette\Utils\Strings::match($content, self::PARSE_INDENT_REGEX);
|
||||||
if (isset($match['indent'])) {
|
if (isset($match['indent'])) {
|
||||||
return self::fromString($match['indent']);
|
return self::fromString($match['indent']);
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace Rector\FileFormatter\ValueObject;
|
namespace Rector\FileFormatter\ValueObject;
|
||||||
|
|
||||||
use RectorPrefix20210613\Nette\Utils\Strings;
|
use RectorPrefix20210614\Nette\Utils\Strings;
|
||||||
use const PHP_EOL;
|
use const PHP_EOL;
|
||||||
use Rector\FileFormatter\Exception\InvalidNewLineStringException;
|
use Rector\FileFormatter\Exception\InvalidNewLineStringException;
|
||||||
use Stringable;
|
use Stringable;
|
||||||
@ -55,7 +55,7 @@ final class NewLine
|
|||||||
*/
|
*/
|
||||||
public static function fromSingleCharacter(string $content)
|
public static function fromSingleCharacter(string $content)
|
||||||
{
|
{
|
||||||
$matches = \RectorPrefix20210613\Nette\Utils\Strings::match($content, self::VALID_NEWLINE_REGEX);
|
$matches = \RectorPrefix20210614\Nette\Utils\Strings::match($content, self::VALID_NEWLINE_REGEX);
|
||||||
if ($matches === null) {
|
if ($matches === null) {
|
||||||
throw \Rector\FileFormatter\Exception\InvalidNewLineStringException::fromString($content);
|
throw \Rector\FileFormatter\Exception\InvalidNewLineStringException::fromString($content);
|
||||||
}
|
}
|
||||||
@ -66,7 +66,7 @@ final class NewLine
|
|||||||
*/
|
*/
|
||||||
public static function fromContent(string $content)
|
public static function fromContent(string $content)
|
||||||
{
|
{
|
||||||
$match = \RectorPrefix20210613\Nette\Utils\Strings::match($content, self::NEWLINE_REGEX);
|
$match = \RectorPrefix20210614\Nette\Utils\Strings::match($content, self::NEWLINE_REGEX);
|
||||||
if (isset($match['newLine'])) {
|
if (isset($match['newLine'])) {
|
||||||
return self::fromSingleCharacter($match['newLine']);
|
return self::fromSingleCharacter($match['newLine']);
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace Rector\FileSystemRector\ValueObjectFactory;
|
namespace Rector\FileSystemRector\ValueObjectFactory;
|
||||||
|
|
||||||
use RectorPrefix20210613\Nette\Utils\Strings;
|
use RectorPrefix20210614\Nette\Utils\Strings;
|
||||||
use PhpParser\Node;
|
use PhpParser\Node;
|
||||||
use PhpParser\Node\Name;
|
use PhpParser\Node\Name;
|
||||||
use PhpParser\Node\Name\FullyQualified;
|
use PhpParser\Node\Name\FullyQualified;
|
||||||
@ -71,7 +71,7 @@ final class AddedFileWithNodesFactory
|
|||||||
if ($oldClassName === $newClassName) {
|
if ($oldClassName === $newClassName) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (\RectorPrefix20210613\Nette\Utils\Strings::match($oldClassName, '#\\b' . $desiredGroupName . '\\b#')) {
|
if (\RectorPrefix20210614\Nette\Utils\Strings::match($oldClassName, '#\\b' . $desiredGroupName . '\\b#')) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// 1. rename namespace
|
// 1. rename namespace
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace Rector\NodeCollector\NodeCollector;
|
namespace Rector\NodeCollector\NodeCollector;
|
||||||
|
|
||||||
use RectorPrefix20210613\Nette\Utils\Arrays;
|
use RectorPrefix20210614\Nette\Utils\Arrays;
|
||||||
use PhpParser\Node;
|
use PhpParser\Node;
|
||||||
use PhpParser\Node\Attribute;
|
use PhpParser\Node\Attribute;
|
||||||
use PhpParser\Node\Expr;
|
use PhpParser\Node\Expr;
|
||||||
@ -190,7 +190,7 @@ final class NodeRepository
|
|||||||
*/
|
*/
|
||||||
public function getMethodsCalls() : array
|
public function getMethodsCalls() : array
|
||||||
{
|
{
|
||||||
$calls = \RectorPrefix20210613\Nette\Utils\Arrays::flatten($this->callsByTypeAndMethod);
|
$calls = \RectorPrefix20210614\Nette\Utils\Arrays::flatten($this->callsByTypeAndMethod);
|
||||||
return \array_filter($calls, function (\PhpParser\Node $node) : bool {
|
return \array_filter($calls, function (\PhpParser\Node $node) : bool {
|
||||||
return $node instanceof \PhpParser\Node\Expr\MethodCall;
|
return $node instanceof \PhpParser\Node\Expr\MethodCall;
|
||||||
});
|
});
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace Rector\NodeCollector;
|
namespace Rector\NodeCollector;
|
||||||
|
|
||||||
use RectorPrefix20210613\Nette\Utils\Strings;
|
use RectorPrefix20210614\Nette\Utils\Strings;
|
||||||
use PHPStan\PhpDoc\ResolvedPhpDocBlock;
|
use PHPStan\PhpDoc\ResolvedPhpDocBlock;
|
||||||
use PHPStan\Reflection\ClassReflection;
|
use PHPStan\Reflection\ClassReflection;
|
||||||
use PHPStan\Reflection\ReflectionProvider;
|
use PHPStan\Reflection\ReflectionProvider;
|
||||||
@ -51,6 +51,6 @@ final class StaticAnalyzer
|
|||||||
if (!$resolvedPhpDocBlock instanceof \PHPStan\PhpDoc\ResolvedPhpDocBlock) {
|
if (!$resolvedPhpDocBlock instanceof \PHPStan\PhpDoc\ResolvedPhpDocBlock) {
|
||||||
return \false;
|
return \false;
|
||||||
}
|
}
|
||||||
return (bool) \RectorPrefix20210613\Nette\Utils\Strings::match($resolvedPhpDocBlock->getPhpDocString(), '#@method\\s*static\\s*(.*?)\\b' . $methodName . '\\b#');
|
return (bool) \RectorPrefix20210614\Nette\Utils\Strings::match($resolvedPhpDocBlock->getPhpDocString(), '#@method\\s*static\\s*(.*?)\\b' . $methodName . '\\b#');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace Rector\NodeNameResolver;
|
namespace Rector\NodeNameResolver;
|
||||||
|
|
||||||
use RectorPrefix20210613\Nette\Utils\Strings;
|
use RectorPrefix20210614\Nette\Utils\Strings;
|
||||||
use PhpParser\Node;
|
use PhpParser\Node;
|
||||||
use PhpParser\Node\Expr;
|
use PhpParser\Node\Expr;
|
||||||
use PhpParser\Node\Expr\MethodCall;
|
use PhpParser\Node\Expr\MethodCall;
|
||||||
@ -147,7 +147,7 @@ final class NodeNameResolver
|
|||||||
public function endsWith(string $currentName, string $expectedName) : bool
|
public function endsWith(string $currentName, string $expectedName) : bool
|
||||||
{
|
{
|
||||||
$suffixNamePattern = '#\\w+' . \ucfirst($expectedName) . '#';
|
$suffixNamePattern = '#\\w+' . \ucfirst($expectedName) . '#';
|
||||||
return (bool) \RectorPrefix20210613\Nette\Utils\Strings::match($currentName, $suffixNamePattern);
|
return (bool) \RectorPrefix20210614\Nette\Utils\Strings::match($currentName, $suffixNamePattern);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @param string|\PhpParser\Node\Name|\PhpParser\Node\Identifier|\PhpParser\Node\Stmt\ClassLike $name
|
* @param string|\PhpParser\Node\Name|\PhpParser\Node\Identifier|\PhpParser\Node\Stmt\ClassLike $name
|
||||||
@ -189,7 +189,7 @@ final class NodeNameResolver
|
|||||||
}
|
}
|
||||||
// is probably regex pattern
|
// is probably regex pattern
|
||||||
if ($this->regexPatternDetector->isRegexPattern($name)) {
|
if ($this->regexPatternDetector->isRegexPattern($name)) {
|
||||||
return (bool) \RectorPrefix20210613\Nette\Utils\Strings::match($resolvedName, $name);
|
return (bool) \RectorPrefix20210614\Nette\Utils\Strings::match($resolvedName, $name);
|
||||||
}
|
}
|
||||||
// is probably fnmatch
|
// is probably fnmatch
|
||||||
if (\strpos($name, '*') !== \false) {
|
if (\strpos($name, '*') !== \false) {
|
||||||
|
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