Skip to content

Commit 3108cf3

Browse files
committed
refactor(SoarBench): Update BeforeMethods attribute syntax
- Change the BeforeMethods attribute to use an array syntax for consistency. - Adjust the handling of class names to ensure proper casing with lcfirst. - Comment out unnecessary parameters for clarity and maintainability. Signed-off-by: guanguans <ityaozm@gmail.com>
1 parent fec02b3 commit 3108cf3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

benchmarks/SoarBench.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
use PhpBench\Attributes\BeforeMethods;
2121
use PhpBench\Attributes\Revs;
2222

23-
#[BeforeMethods('setUp')]
23+
#[BeforeMethods(['setUp'])]
2424
#[Revs(10)]
2525
final class SoarBench
2626
{

rector.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@
140140
classes(static fn (string $class): bool => str_starts_with($class, 'PhpBench\Attributes'))
141141
->filter(static fn (ReflectionClass $reflectionClass): bool => $reflectionClass->isInstantiable())
142142
->map(static fn (ReflectionClass $reflectionClass): AnnotationToAttribute => new AnnotationToAttribute(
143-
$reflectionClass->getShortName(),
143+
lcfirst($reflectionClass->getShortName()),
144144
$reflectionClass->getName(),
145-
[],
146-
true
145+
// [],
146+
// true
147147
))
148148
->all(),
149149
)

0 commit comments

Comments
 (0)