rector/config/set/flysystem-20.php
Tomas Votruba ebc0abcc08 Updated Rector to commit e0b4e852a64ee87adf72f3308ec51e9672b71bbc
e0b4e852a6 [Php80] Annotation attribute should keep order original annotation comment (#104)
2021-05-28 12:08:33 +00:00

30 lines
2.2 KiB
PHP

<?php
declare (strict_types=1);
namespace RectorPrefix20210528;
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
use Rector\Renaming\ValueObject\MethodCallRename;
use RectorPrefix20210528\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\SymfonyPhpConfig\ValueObjectInliner;
return static function (\RectorPrefix20210528\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
$services = $containerConfigurator->services();
$services->set(\Rector\Renaming\Rector\MethodCall\RenameMethodRector::class)->call('configure', [[\Rector\Renaming\Rector\MethodCall\RenameMethodRector::METHOD_CALL_RENAMES => \Symplify\SymfonyPhpConfig\ValueObjectInliner::inline([
// Rename is now move, specific for files.
new \Rector\Renaming\ValueObject\MethodCallRename('League\\Flysystem\\Filesystem', 'rename', 'move'),
// No arbitrary abbreviations
new \Rector\Renaming\ValueObject\MethodCallRename('League\\Flysystem\\Filesystem', 'createDir', 'createDirectory'),
// Writes are now deterministic
new \Rector\Renaming\ValueObject\MethodCallRename('League\\Flysystem\\Filesystem', 'update', 'write'),
new \Rector\Renaming\ValueObject\MethodCallRename('League\\Flysystem\\Filesystem', 'updateStream', 'writeStream'),
new \Rector\Renaming\ValueObject\MethodCallRename('League\\Flysystem\\Filesystem', 'put', 'write'),
new \Rector\Renaming\ValueObject\MethodCallRename('League\\Flysystem\\Filesystem', 'putStream', 'writeStream'),
// Metadata getters are renamed
new \Rector\Renaming\ValueObject\MethodCallRename('League\\Flysystem\\Filesystem', 'getTimestamp', 'lastModified'),
new \Rector\Renaming\ValueObject\MethodCallRename('League\\Flysystem\\Filesystem', 'has', 'fileExists'),
new \Rector\Renaming\ValueObject\MethodCallRename('League\\Flysystem\\Filesystem', 'getMimetype', 'mimeType'),
new \Rector\Renaming\ValueObject\MethodCallRename('League\\Flysystem\\Filesystem', 'getSize', 'fileSize'),
new \Rector\Renaming\ValueObject\MethodCallRename('League\\Flysystem\\Filesystem', 'getVisibility', 'visibility'),
])]]);
};