Bug Report
| Subject |
Details |
| Rector version |
last dev-main |
| Installed as |
composer dependency |
Minimal PHP Code Causing Issue
See https://getrector.com/demo/de31b175-d8e1-4350-a5d4-bddad0d34775
<?php
declare(strict_types=1);
namespace App\Tests;
use PHPUnit\Framework\TestCase;
final class ExampleTest extends TestCase
{
/**
* there is some comment with something@test
*/
private function someFunction()
{
return true;
}
public function testSomething()
{
$this->assertTrue($this->someFunction());
}
}
Responsible rules
ReplaceTestAnnotationWithPrefixedFunctionRector
Is applied if there is "@test" anywhere in doc comment even if it is part of word.
RemoveUnusedPrivateMethodRector (this rule works correctly, just makes the problem of previous rule worse)
Builds on previous rule and removes the renamed private (now testSomeFunction) function.
Expected Behavior
No changes should be made.
Bug Report
Minimal PHP Code Causing Issue
See https://getrector.com/demo/de31b175-d8e1-4350-a5d4-bddad0d34775
Responsible rules
ReplaceTestAnnotationWithPrefixedFunctionRectorIs applied if there is "@test" anywhere in doc comment even if it is part of word.
RemoveUnusedPrivateMethodRector(this rule works correctly, just makes the problem of previous rule worse)Builds on previous rule and removes the renamed private (now testSomeFunction) function.
Expected Behavior
No changes should be made.