mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 21:38:22 +01:00
[CodingStyle] Skip RemoveDoubleUnderscoreInMethodNameRector when method name only __ (#4640)
This commit is contained in:
parent
c58f35a41e
commit
d788fd051a
@ -24,9 +24,9 @@ final class RemoveDoubleUnderscoreInMethodNameRector extends AbstractRector
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
* @see https://regex101.com/r/oRrhDJ/2
|
||||
* @see https://regex101.com/r/oRrhDJ/3
|
||||
*/
|
||||
private const DOUBLE_UNDERSCORE_START_REGEX = '#^__(.*?)#';
|
||||
private const DOUBLE_UNDERSCORE_START_REGEX = '#^__(.+)#';
|
||||
|
||||
public function getRuleDefinition(): RuleDefinition
|
||||
{
|
||||
|
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\CodingStyle\Tests\Rector\ClassMethod\RemoveDoubleUnderscoreInMethodNameRector\Fixture;
|
||||
|
||||
class SkipMethodOnlyDoubleUnderscore
|
||||
{
|
||||
function __() {}
|
||||
}
|
||||
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user