Skip to content

Commit

Permalink
Adds replacements for functions of hyperf/translation
Browse files Browse the repository at this point in the history
  • Loading branch information
huangdijia committed Jun 2, 2023
1 parent 69eb827 commit 26d5ab9
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions config/sets/hyperf31.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,33 +128,47 @@

$rectorConfig
->ruleWithConfiguration(RenameFunctionRector::class, [
// hyperf/config
'config' => 'Hyperf\Config\config',
'value' => 'Hyperf\Support\value',
'env' => 'Hyperf\Support\env',
'retry' => 'Hyperf\Support\retry',
'with' => 'Hyperf\Support\with',

// hyperf/collection
'collect' => 'Hyperf\Collection\collect',
'data_fill' => 'Hyperf\Collection\data_fill',
'data_get' => 'Hyperf\Collection\data_get',
'data_set' => 'Hyperf\Collection\data_set',
'head' => 'Hyperf\Collection\head',
'last' => 'Hyperf\Collection\last',
'tap' => 'Hyperf\Tappable\tap',
'call' => 'Hyperf\Support\call',
'go' => 'Hyperf\Coroutine\go',

// hyperf/continue
'co' => 'Hyperf\Coroutine\co',
'defer' => 'Hyperf\Coroutine\defer',
'go' => 'Hyperf\Coroutine\go',
'parallel' => 'Hyperf\Coroutine\parallel',
'run' => 'Hyperf\Coroutine\run',
'wait' => 'Hyperf\Coroutine\wait',

// hyperf/tappable
'tap' => 'Hyperf\Tappable\tap',

// hyperf/translation
'__' => 'Hyperf\Translation\__',
'trans' => 'Hyperf\Translation\trans',
'trans_choice' => 'Hyperf\Translation\trans_choice',

// hyperf/utils
'value' => 'Hyperf\Support\value',
'env' => 'Hyperf\Support\env',
'retry' => 'Hyperf\Support\retry',
'with' => 'Hyperf\Support\with',
'call' => 'Hyperf\Support\call',
'class_basename' => 'Hyperf\Support\class_basename',
'trait_uses_recursive' => 'Hyperf\Support\trait_uses_recursive',
'class_uses_recursive' => 'Hyperf\Support\class_uses_recursive',
'setter' => 'Hyperf\Support\setter',
'getter' => 'Hyperf\Support\getter',
'parallel' => 'Hyperf\Coroutine\parallel',
'make' => 'Hyperf\Support\make',
'run' => 'Hyperf\Coroutine\run',
'swoole_hook_flags' => 'Hyperf\Support\swoole_hook_flags',
'optional' => 'Hyperf\Support\optional',
'wait' => 'Hyperf\Coroutine\wait',
]);

$rectorConfig->ruleWithConfiguration(RenameMethodRector::class, [
Expand Down

0 comments on commit 26d5ab9

Please sign in to comment.