ergebnis/rector-rules
A curated set of custom Rector rules from ergebnis to automate PHP refactoring and style consistency. Includes rules for sorting arrays and match arms, simplifying call arguments, Faker updates, namespace symbol references, and PHPUnit attribute-to-prefix changes.
PHPUnit\ReplaceTestAttributeWithTestPrefixRectorReplaces #[Test] attributes with test method prefixes.
use PHPUnit\Framework;
final class SomeTest extends Framework\TestCase
{
- #[Framework\Attributes\Test]
- public function onePlusOneShouldBeTwo(): void
+ public function testOnePlusOneShouldBeTwo(): void
{
self::assertSame(2, 1 + 1);
}
}
How can I help you explore Laravel packages today?