mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-08 20:22:24 +00:00
dd31e833a9
ce1c29184d
[scoped] change only year and month, to make diff esaier to see; autoload is handled already
28 lines
1.5 KiB
PHP
28 lines
1.5 KiB
PHP
<?php
|
|
|
|
declare (strict_types=1);
|
|
namespace RectorPrefix202206;
|
|
|
|
use Rector\Config\RectorConfig;
|
|
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
|
|
use Rector\Renaming\ValueObject\MethodCallRename;
|
|
return static function (RectorConfig $rectorConfig) : void {
|
|
$rectorConfig->ruleWithConfiguration(RenameMethodRector::class, [
|
|
// Rename is now move, specific for files.
|
|
new MethodCallRename('League\\Flysystem\\FilesystemInterface', 'rename', 'move'),
|
|
// No arbitrary abbreviations
|
|
new MethodCallRename('League\\Flysystem\\FilesystemInterface', 'createDir', 'createDirectory'),
|
|
// Writes are now deterministic
|
|
new MethodCallRename('League\\Flysystem\\FilesystemInterface', 'update', 'write'),
|
|
new MethodCallRename('League\\Flysystem\\FilesystemInterface', 'updateStream', 'writeStream'),
|
|
new MethodCallRename('League\\Flysystem\\FilesystemInterface', 'put', 'write'),
|
|
new MethodCallRename('League\\Flysystem\\FilesystemInterface', 'putStream', 'writeStream'),
|
|
// Metadata getters are renamed
|
|
new MethodCallRename('League\\Flysystem\\FilesystemInterface', 'getTimestamp', 'lastModified'),
|
|
new MethodCallRename('League\\Flysystem\\FilesystemInterface', 'has', 'fileExists'),
|
|
new MethodCallRename('League\\Flysystem\\FilesystemInterface', 'getMimetype', 'mimeType'),
|
|
new MethodCallRename('League\\Flysystem\\FilesystemInterface', 'getSize', 'fileSize'),
|
|
new MethodCallRename('League\\Flysystem\\FilesystemInterface', 'getVisibility', 'visibility'),
|
|
]);
|
|
};
|