mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-20 23:41:57 +02:00
Updated Rector to commit 1ed8242e4462ace3beabc12632d1f8f4638bd7c3
1ed8242e44
[DX] Remove MoveValueObjectsToValueObjectDirectoryRector, should be handled by PHPStorm refactoring and PHPStan rule checks (#1832)
This commit is contained in:
parent
9b0ea31152
commit
7964c1b773
@ -1,4 +1,4 @@
|
||||
# 518 Rules Overview
|
||||
# 517 Rules Overview
|
||||
|
||||
<br>
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
- [Arguments](#arguments) (4)
|
||||
|
||||
- [Autodiscovery](#autodiscovery) (4)
|
||||
- [Autodiscovery](#autodiscovery) (3)
|
||||
|
||||
- [CodeQuality](#codequality) (71)
|
||||
|
||||
@ -326,53 +326,6 @@ return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
|
||||
<br>
|
||||
|
||||
### MoveValueObjectsToValueObjectDirectoryRector
|
||||
|
||||
Move value object to ValueObject namespace/directory
|
||||
|
||||
:wrench: **configure it!**
|
||||
|
||||
- class: [`Rector\Autodiscovery\Rector\Class_\MoveValueObjectsToValueObjectDirectoryRector`](../rules/Autodiscovery/Rector/Class_/MoveValueObjectsToValueObjectDirectoryRector.php)
|
||||
|
||||
```php
|
||||
use Rector\Autodiscovery\Rector\Class_\MoveValueObjectsToValueObjectDirectoryRector;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$services = $containerConfigurator->services();
|
||||
|
||||
$services->set(MoveValueObjectsToValueObjectDirectoryRector::class)
|
||||
->configure([
|
||||
MoveValueObjectsToValueObjectDirectoryRector::TYPES => ['ValueObjectInterfaceClassName'],
|
||||
MoveValueObjectsToValueObjectDirectoryRector::SUFFIXES => ['Search'],
|
||||
MoveValueObjectsToValueObjectDirectoryRector::ENABLE_VALUE_OBJECT_GUESSING => true,
|
||||
]);
|
||||
};
|
||||
```
|
||||
|
||||
↓
|
||||
|
||||
```diff
|
||||
-// app/Exception/Name.php
|
||||
+// app/ValueObject/Name.php
|
||||
class Name
|
||||
{
|
||||
private $name;
|
||||
|
||||
public function __construct(string $name)
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
## CodeQuality
|
||||
|
||||
### AbsolutizeRequireAndIncludePathRector
|
||||
|
@ -1,111 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Autodiscovery\Analyzer;
|
||||
|
||||
use PhpParser\Node\Stmt\Class_;
|
||||
use PhpParser\Node\Stmt\ClassMethod;
|
||||
use PHPStan\Type\ObjectType;
|
||||
use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory;
|
||||
use Rector\Core\NodeAnalyzer\ClassAnalyzer;
|
||||
use Rector\Core\PhpParser\AstResolver;
|
||||
use Rector\Core\ValueObject\MethodName;
|
||||
use Rector\NodeNameResolver\NodeNameResolver;
|
||||
use Rector\NodeTypeResolver\NodeTypeResolver;
|
||||
final class ValueObjectClassAnalyzer
|
||||
{
|
||||
/**
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
private $valueObjectStatusByClassName = [];
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\NodeTypeResolver\NodeTypeResolver
|
||||
*/
|
||||
private $nodeTypeResolver;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory
|
||||
*/
|
||||
private $phpDocInfoFactory;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Core\PhpParser\AstResolver
|
||||
*/
|
||||
private $astResolver;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Core\NodeAnalyzer\ClassAnalyzer
|
||||
*/
|
||||
private $classAnalyzer;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\NodeNameResolver\NodeNameResolver
|
||||
*/
|
||||
private $nodeNameResolver;
|
||||
public function __construct(\Rector\NodeTypeResolver\NodeTypeResolver $nodeTypeResolver, \Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory $phpDocInfoFactory, \Rector\Core\PhpParser\AstResolver $astResolver, \Rector\Core\NodeAnalyzer\ClassAnalyzer $classAnalyzer, \Rector\NodeNameResolver\NodeNameResolver $nodeNameResolver)
|
||||
{
|
||||
$this->nodeTypeResolver = $nodeTypeResolver;
|
||||
$this->phpDocInfoFactory = $phpDocInfoFactory;
|
||||
$this->astResolver = $astResolver;
|
||||
$this->classAnalyzer = $classAnalyzer;
|
||||
$this->nodeNameResolver = $nodeNameResolver;
|
||||
}
|
||||
public function isValueObjectClass(\PhpParser\Node\Stmt\Class_ $class) : bool
|
||||
{
|
||||
if ($this->classAnalyzer->isAnonymousClass($class)) {
|
||||
return \false;
|
||||
}
|
||||
/** @var string $className */
|
||||
$className = (string) $this->nodeNameResolver->getName($class);
|
||||
if (isset($this->valueObjectStatusByClassName[$className])) {
|
||||
return $this->valueObjectStatusByClassName[$className];
|
||||
}
|
||||
$constructClassMethod = $class->getMethod(\Rector\Core\ValueObject\MethodName::CONSTRUCT);
|
||||
if (!$constructClassMethod instanceof \PhpParser\Node\Stmt\ClassMethod) {
|
||||
return $this->hasExlusivelySerializeProperties($class, $className);
|
||||
}
|
||||
// resolve constructor types
|
||||
foreach ($constructClassMethod->params as $param) {
|
||||
$paramType = $this->nodeTypeResolver->getType($param);
|
||||
if (!$paramType instanceof \PHPStan\Type\ObjectType) {
|
||||
continue;
|
||||
}
|
||||
// awesome!
|
||||
// is it services or value object?
|
||||
$paramTypeClass = $this->astResolver->resolveClassFromName($paramType->getClassName());
|
||||
if (!$paramTypeClass instanceof \PhpParser\Node\Stmt\Class_) {
|
||||
// not sure :/
|
||||
continue;
|
||||
}
|
||||
if (!$this->isValueObjectClass($paramTypeClass)) {
|
||||
return \false;
|
||||
}
|
||||
}
|
||||
// if we didn't prove it's not a value object so far → fallback to true
|
||||
$this->valueObjectStatusByClassName[$className] = \true;
|
||||
return \true;
|
||||
}
|
||||
private function hasExlusivelySerializeProperties(\PhpParser\Node\Stmt\Class_ $class, string $className) : bool
|
||||
{
|
||||
// A. has all properties with serialize?
|
||||
if ($this->hasAllPropertiesWithSerialize($class)) {
|
||||
$this->valueObjectStatusByClassName[$className] = \true;
|
||||
return \true;
|
||||
}
|
||||
// probably not a value object
|
||||
$this->valueObjectStatusByClassName[$className] = \false;
|
||||
return \false;
|
||||
}
|
||||
private function hasAllPropertiesWithSerialize(\PhpParser\Node\Stmt\Class_ $class) : bool
|
||||
{
|
||||
foreach ($class->getProperties() as $property) {
|
||||
$phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($property);
|
||||
if ($phpDocInfo->hasByAnnotationClass('JMS\\Serializer\\Annotation\\Type')) {
|
||||
continue;
|
||||
}
|
||||
return \false;
|
||||
}
|
||||
return \true;
|
||||
}
|
||||
}
|
@ -1,195 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Autodiscovery\Rector\Class_;
|
||||
|
||||
use RectorPrefix20220218\Controller;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Stmt\Class_;
|
||||
use PHPStan\Type\ObjectType;
|
||||
use Rector\Autodiscovery\Analyzer\ValueObjectClassAnalyzer;
|
||||
use Rector\Core\Contract\Rector\ConfigurableRectorInterface;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use Rector\FileSystemRector\ValueObject\AddedFileWithNodes;
|
||||
use Rector\FileSystemRector\ValueObjectFactory\AddedFileWithNodesFactory;
|
||||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
use RectorPrefix20220218\Webmozart\Assert\Assert;
|
||||
/**
|
||||
* Inspiration @see https://github.com/rectorphp/rector/pull/1865/files#diff-0d18e660cdb626958662641b491623f8
|
||||
* @wip
|
||||
*
|
||||
* @see \Rector\Tests\Autodiscovery\Rector\Class_\MoveValueObjectsToValueObjectDirectoryRector\MoveValueObjectsToValueObjectDirectoryRectorTest
|
||||
*/
|
||||
final class MoveValueObjectsToValueObjectDirectoryRector extends \Rector\Core\Rector\AbstractRector implements \Rector\Core\Contract\Rector\ConfigurableRectorInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const TYPES = 'types';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const SUFFIXES = 'suffixes';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const ENABLE_VALUE_OBJECT_GUESSING = 'enable_value_object_guessing';
|
||||
/**
|
||||
* @var string[]|class-string<Controller>[]
|
||||
*/
|
||||
private const COMMON_SERVICE_SUFFIXES = ['Repository', 'Command', 'Mapper', 'Controller', 'Presenter', 'Factory', 'Test', 'TestCase', 'Service'];
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $enableValueObjectGuessing = \true;
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
private $types = [];
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
private $suffixes = [];
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\FileSystemRector\ValueObjectFactory\AddedFileWithNodesFactory
|
||||
*/
|
||||
private $addedFileWithNodesFactory;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Autodiscovery\Analyzer\ValueObjectClassAnalyzer
|
||||
*/
|
||||
private $valueObjectClassAnalyzer;
|
||||
public function __construct(\Rector\FileSystemRector\ValueObjectFactory\AddedFileWithNodesFactory $addedFileWithNodesFactory, \Rector\Autodiscovery\Analyzer\ValueObjectClassAnalyzer $valueObjectClassAnalyzer)
|
||||
{
|
||||
$this->addedFileWithNodesFactory = $addedFileWithNodesFactory;
|
||||
$this->valueObjectClassAnalyzer = $valueObjectClassAnalyzer;
|
||||
}
|
||||
public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition
|
||||
{
|
||||
return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Move value object to ValueObject namespace/directory', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample(<<<'CODE_SAMPLE'
|
||||
// app/Exception/Name.php
|
||||
class Name
|
||||
{
|
||||
private $name;
|
||||
|
||||
public function __construct(string $name)
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, <<<'CODE_SAMPLE'
|
||||
// app/ValueObject/Name.php
|
||||
class Name
|
||||
{
|
||||
private $name;
|
||||
|
||||
public function __construct(string $name)
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::TYPES => ['ValueObjectInterfaceClassName'], self::SUFFIXES => ['Search'], self::ENABLE_VALUE_OBJECT_GUESSING => \true])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
*/
|
||||
public function getNodeTypes() : array
|
||||
{
|
||||
return [\PhpParser\Node\Stmt\Class_::class];
|
||||
}
|
||||
/**
|
||||
* @param Class_ $node
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node
|
||||
{
|
||||
if (!$this->isValueObjectMatch($node)) {
|
||||
return null;
|
||||
}
|
||||
$smartFileInfo = $this->file->getSmartFileInfo();
|
||||
$addedFileWithNodes = $this->addedFileWithNodesFactory->createWithDesiredGroup($smartFileInfo, $this->file, 'ValueObject');
|
||||
if (!$addedFileWithNodes instanceof \Rector\FileSystemRector\ValueObject\AddedFileWithNodes) {
|
||||
return null;
|
||||
}
|
||||
$this->removedAndAddedFilesCollector->removeFile($smartFileInfo);
|
||||
$this->removedAndAddedFilesCollector->addAddedFile($addedFileWithNodes);
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* @param mixed[] $configuration
|
||||
*/
|
||||
public function configure(array $configuration) : void
|
||||
{
|
||||
$types = $configuration[self::TYPES] ?? [];
|
||||
\RectorPrefix20220218\Webmozart\Assert\Assert::isArray($types);
|
||||
\RectorPrefix20220218\Webmozart\Assert\Assert::allString($types);
|
||||
$this->types = $types;
|
||||
$suffixes = $configuration[self::SUFFIXES] ?? [];
|
||||
\RectorPrefix20220218\Webmozart\Assert\Assert::isArray($suffixes);
|
||||
\RectorPrefix20220218\Webmozart\Assert\Assert::allString($suffixes);
|
||||
$this->suffixes = $suffixes;
|
||||
$enableValueObjectGuessing = $configuration[self::ENABLE_VALUE_OBJECT_GUESSING] ?? \false;
|
||||
\RectorPrefix20220218\Webmozart\Assert\Assert::boolean($enableValueObjectGuessing);
|
||||
$this->enableValueObjectGuessing = $enableValueObjectGuessing;
|
||||
}
|
||||
private function isValueObjectMatch(\PhpParser\Node\Stmt\Class_ $class) : bool
|
||||
{
|
||||
if ($this->isSuffixMatch($class)) {
|
||||
return \true;
|
||||
}
|
||||
$className = $this->getName($class);
|
||||
if ($className === null) {
|
||||
return \false;
|
||||
}
|
||||
$classObjectType = new \PHPStan\Type\ObjectType($className);
|
||||
foreach ($this->types as $type) {
|
||||
$desiredObjectType = new \PHPStan\Type\ObjectType($type);
|
||||
if ($desiredObjectType->isSuperTypeOf($classObjectType)->yes()) {
|
||||
return \true;
|
||||
}
|
||||
}
|
||||
if ($this->isKnownServiceType($className)) {
|
||||
return \false;
|
||||
}
|
||||
if (!$this->enableValueObjectGuessing) {
|
||||
return \false;
|
||||
}
|
||||
return $this->valueObjectClassAnalyzer->isValueObjectClass($class);
|
||||
}
|
||||
private function isSuffixMatch(\PhpParser\Node\Stmt\Class_ $class) : bool
|
||||
{
|
||||
$className = $this->getName($class);
|
||||
if (!\is_string($className)) {
|
||||
return \false;
|
||||
}
|
||||
foreach ($this->suffixes as $suffix) {
|
||||
if (\substr_compare($className, $suffix, -\strlen($suffix)) === 0) {
|
||||
return \true;
|
||||
}
|
||||
}
|
||||
return \false;
|
||||
}
|
||||
private function isKnownServiceType(string $className) : bool
|
||||
{
|
||||
foreach (self::COMMON_SERVICE_SUFFIXES as $commonServiceSuffix) {
|
||||
if (\substr_compare($className, $commonServiceSuffix, -\strlen($commonServiceSuffix)) === 0) {
|
||||
return \true;
|
||||
}
|
||||
}
|
||||
return \false;
|
||||
}
|
||||
}
|
@ -16,11 +16,11 @@ final class VersionResolver
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'cab829909370c582441afaf59225d48eb9a86be1';
|
||||
public const PACKAGE_VERSION = '1ed8242e4462ace3beabc12632d1f8f4638bd7c3';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2022-02-18 01:49:31';
|
||||
public const RELEASE_DATE = '2022-02-18 01:00:33';
|
||||
public static function resolvePackageVersion() : string
|
||||
{
|
||||
$process = new \RectorPrefix20220218\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);
|
||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -4,4 +4,4 @@
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit0df88c7745440821c3aae20346ab83d6::getLoader();
|
||||
return ComposerAutoloaderInit6803c5aa61198f26a2560abb9252e1ec::getLoader();
|
||||
|
2
vendor/composer/autoload_classmap.php
vendored
2
vendor/composer/autoload_classmap.php
vendored
@ -1372,13 +1372,11 @@ return array(
|
||||
'Rector\\Arguments\\ValueObject\\ReplaceArgumentDefaultValue' => $baseDir . '/rules/Arguments/ValueObject/ReplaceArgumentDefaultValue.php',
|
||||
'Rector\\Arguments\\ValueObject\\ReplaceFuncCallArgumentDefaultValue' => $baseDir . '/rules/Arguments/ValueObject/ReplaceFuncCallArgumentDefaultValue.php',
|
||||
'Rector\\Arguments\\ValueObject\\SwapFuncCallArguments' => $baseDir . '/rules/Arguments/ValueObject/SwapFuncCallArguments.php',
|
||||
'Rector\\Autodiscovery\\Analyzer\\ValueObjectClassAnalyzer' => $baseDir . '/rules/Autodiscovery/Analyzer/ValueObjectClassAnalyzer.php',
|
||||
'Rector\\Autodiscovery\\Configuration\\CategoryNamespaceProvider' => $baseDir . '/rules/Autodiscovery/Configuration/CategoryNamespaceProvider.php',
|
||||
'Rector\\Autodiscovery\\FileLocation\\ExpectedFileLocationResolver' => $baseDir . '/rules/Autodiscovery/FileLocation/ExpectedFileLocationResolver.php',
|
||||
'Rector\\Autodiscovery\\NodeAnalyzer\\NetteComponentFactoryInterfaceAnalyzer' => $baseDir . '/rules/Autodiscovery/NodeAnalyzer/NetteComponentFactoryInterfaceAnalyzer.php',
|
||||
'Rector\\Autodiscovery\\Rector\\Class_\\MoveEntitiesToEntityDirectoryRector' => $baseDir . '/rules/Autodiscovery/Rector/Class_/MoveEntitiesToEntityDirectoryRector.php',
|
||||
'Rector\\Autodiscovery\\Rector\\Class_\\MoveServicesBySuffixToDirectoryRector' => $baseDir . '/rules/Autodiscovery/Rector/Class_/MoveServicesBySuffixToDirectoryRector.php',
|
||||
'Rector\\Autodiscovery\\Rector\\Class_\\MoveValueObjectsToValueObjectDirectoryRector' => $baseDir . '/rules/Autodiscovery/Rector/Class_/MoveValueObjectsToValueObjectDirectoryRector.php',
|
||||
'Rector\\Autodiscovery\\Rector\\Interface_\\MoveInterfacesToContractNamespaceDirectoryRector' => $baseDir . '/rules/Autodiscovery/Rector/Interface_/MoveInterfacesToContractNamespaceDirectoryRector.php',
|
||||
'Rector\\BetterPhpDocParser\\Annotation\\AnnotationNaming' => $baseDir . '/packages/BetterPhpDocParser/Annotation/AnnotationNaming.php',
|
||||
'Rector\\BetterPhpDocParser\\Attributes\\AttributeMirrorer' => $baseDir . '/packages/BetterPhpDocParser/Attributes/AttributeMirrorer.php',
|
||||
|
14
vendor/composer/autoload_real.php
vendored
14
vendor/composer/autoload_real.php
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit0df88c7745440821c3aae20346ab83d6
|
||||
class ComposerAutoloaderInit6803c5aa61198f26a2560abb9252e1ec
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,15 +22,15 @@ class ComposerAutoloaderInit0df88c7745440821c3aae20346ab83d6
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit0df88c7745440821c3aae20346ab83d6', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit6803c5aa61198f26a2560abb9252e1ec', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit0df88c7745440821c3aae20346ab83d6', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit6803c5aa61198f26a2560abb9252e1ec', 'loadClassLoader'));
|
||||
|
||||
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
||||
if ($useStaticLoader) {
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit0df88c7745440821c3aae20346ab83d6::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit6803c5aa61198f26a2560abb9252e1ec::getInitializer($loader));
|
||||
} else {
|
||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
||||
if ($classMap) {
|
||||
@ -42,12 +42,12 @@ class ComposerAutoloaderInit0df88c7745440821c3aae20346ab83d6
|
||||
$loader->register(true);
|
||||
|
||||
if ($useStaticLoader) {
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInit0df88c7745440821c3aae20346ab83d6::$files;
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInit6803c5aa61198f26a2560abb9252e1ec::$files;
|
||||
} else {
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
}
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequire0df88c7745440821c3aae20346ab83d6($fileIdentifier, $file);
|
||||
composerRequire6803c5aa61198f26a2560abb9252e1ec($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
@ -59,7 +59,7 @@ class ComposerAutoloaderInit0df88c7745440821c3aae20346ab83d6
|
||||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
function composerRequire0df88c7745440821c3aae20346ab83d6($fileIdentifier, $file)
|
||||
function composerRequire6803c5aa61198f26a2560abb9252e1ec($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
10
vendor/composer/autoload_static.php
vendored
10
vendor/composer/autoload_static.php
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit0df88c7745440821c3aae20346ab83d6
|
||||
class ComposerStaticInit6803c5aa61198f26a2560abb9252e1ec
|
||||
{
|
||||
public static $files = array (
|
||||
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
|
||||
@ -1761,13 +1761,11 @@ class ComposerStaticInit0df88c7745440821c3aae20346ab83d6
|
||||
'Rector\\Arguments\\ValueObject\\ReplaceArgumentDefaultValue' => __DIR__ . '/../..' . '/rules/Arguments/ValueObject/ReplaceArgumentDefaultValue.php',
|
||||
'Rector\\Arguments\\ValueObject\\ReplaceFuncCallArgumentDefaultValue' => __DIR__ . '/../..' . '/rules/Arguments/ValueObject/ReplaceFuncCallArgumentDefaultValue.php',
|
||||
'Rector\\Arguments\\ValueObject\\SwapFuncCallArguments' => __DIR__ . '/../..' . '/rules/Arguments/ValueObject/SwapFuncCallArguments.php',
|
||||
'Rector\\Autodiscovery\\Analyzer\\ValueObjectClassAnalyzer' => __DIR__ . '/../..' . '/rules/Autodiscovery/Analyzer/ValueObjectClassAnalyzer.php',
|
||||
'Rector\\Autodiscovery\\Configuration\\CategoryNamespaceProvider' => __DIR__ . '/../..' . '/rules/Autodiscovery/Configuration/CategoryNamespaceProvider.php',
|
||||
'Rector\\Autodiscovery\\FileLocation\\ExpectedFileLocationResolver' => __DIR__ . '/../..' . '/rules/Autodiscovery/FileLocation/ExpectedFileLocationResolver.php',
|
||||
'Rector\\Autodiscovery\\NodeAnalyzer\\NetteComponentFactoryInterfaceAnalyzer' => __DIR__ . '/../..' . '/rules/Autodiscovery/NodeAnalyzer/NetteComponentFactoryInterfaceAnalyzer.php',
|
||||
'Rector\\Autodiscovery\\Rector\\Class_\\MoveEntitiesToEntityDirectoryRector' => __DIR__ . '/../..' . '/rules/Autodiscovery/Rector/Class_/MoveEntitiesToEntityDirectoryRector.php',
|
||||
'Rector\\Autodiscovery\\Rector\\Class_\\MoveServicesBySuffixToDirectoryRector' => __DIR__ . '/../..' . '/rules/Autodiscovery/Rector/Class_/MoveServicesBySuffixToDirectoryRector.php',
|
||||
'Rector\\Autodiscovery\\Rector\\Class_\\MoveValueObjectsToValueObjectDirectoryRector' => __DIR__ . '/../..' . '/rules/Autodiscovery/Rector/Class_/MoveValueObjectsToValueObjectDirectoryRector.php',
|
||||
'Rector\\Autodiscovery\\Rector\\Interface_\\MoveInterfacesToContractNamespaceDirectoryRector' => __DIR__ . '/../..' . '/rules/Autodiscovery/Rector/Interface_/MoveInterfacesToContractNamespaceDirectoryRector.php',
|
||||
'Rector\\BetterPhpDocParser\\Annotation\\AnnotationNaming' => __DIR__ . '/../..' . '/packages/BetterPhpDocParser/Annotation/AnnotationNaming.php',
|
||||
'Rector\\BetterPhpDocParser\\Attributes\\AttributeMirrorer' => __DIR__ . '/../..' . '/packages/BetterPhpDocParser/Attributes/AttributeMirrorer.php',
|
||||
@ -3873,9 +3871,9 @@ class ComposerStaticInit0df88c7745440821c3aae20346ab83d6
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit0df88c7745440821c3aae20346ab83d6::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit0df88c7745440821c3aae20346ab83d6::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit0df88c7745440821c3aae20346ab83d6::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit6803c5aa61198f26a2560abb9252e1ec::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit6803c5aa61198f26a2560abb9252e1ec::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit6803c5aa61198f26a2560abb9252e1ec::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
10
vendor/scoper-autoload.php
vendored
10
vendor/scoper-autoload.php
vendored
@ -9,8 +9,8 @@ $loader = require_once __DIR__.'/autoload.php';
|
||||
if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) {
|
||||
spl_autoload_call('RectorPrefix20220218\AutoloadIncluder');
|
||||
}
|
||||
if (!class_exists('ComposerAutoloaderInit0df88c7745440821c3aae20346ab83d6', false) && !interface_exists('ComposerAutoloaderInit0df88c7745440821c3aae20346ab83d6', false) && !trait_exists('ComposerAutoloaderInit0df88c7745440821c3aae20346ab83d6', false)) {
|
||||
spl_autoload_call('RectorPrefix20220218\ComposerAutoloaderInit0df88c7745440821c3aae20346ab83d6');
|
||||
if (!class_exists('ComposerAutoloaderInit6803c5aa61198f26a2560abb9252e1ec', false) && !interface_exists('ComposerAutoloaderInit6803c5aa61198f26a2560abb9252e1ec', false) && !trait_exists('ComposerAutoloaderInit6803c5aa61198f26a2560abb9252e1ec', false)) {
|
||||
spl_autoload_call('RectorPrefix20220218\ComposerAutoloaderInit6803c5aa61198f26a2560abb9252e1ec');
|
||||
}
|
||||
if (!class_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !interface_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !trait_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false)) {
|
||||
spl_autoload_call('RectorPrefix20220218\Helmich\TypoScriptParser\Parser\AST\Statement');
|
||||
@ -59,9 +59,9 @@ if (!function_exists('print_node')) {
|
||||
return \RectorPrefix20220218\print_node(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('composerRequire0df88c7745440821c3aae20346ab83d6')) {
|
||||
function composerRequire0df88c7745440821c3aae20346ab83d6() {
|
||||
return \RectorPrefix20220218\composerRequire0df88c7745440821c3aae20346ab83d6(...func_get_args());
|
||||
if (!function_exists('composerRequire6803c5aa61198f26a2560abb9252e1ec')) {
|
||||
function composerRequire6803c5aa61198f26a2560abb9252e1ec() {
|
||||
return \RectorPrefix20220218\composerRequire6803c5aa61198f26a2560abb9252e1ec(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('scanPath')) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user