File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -275,7 +275,7 @@ public function methodFromString(string $argumentName): MethodGenerator
275
275
276
276
private function throwExceptionLine (string $ argumentName ): string
277
277
{
278
- $ name = ( $ this ->constValueFilter )($ argumentName );
278
+ $ name = \ucfirst (( $ this ->constValueFilter )($ argumentName) );
279
279
280
280
return 'throw Invalid ' . $ name . '::for ' . $ name . '($ ' . $ argumentName . '); ' ;
281
281
}
@@ -362,7 +362,7 @@ public function methodMagicToString(string $argumentName): MethodGenerator
362
362
public function methodEnumNamedConstructor (string $ enumValue ): MethodGenerator
363
363
{
364
364
$ method = new MethodGenerator (
365
- \lcfirst (( $ this ->constValueFilter )($ enumValue) ),
365
+ ( $ this ->constValueFilter )($ enumValue ),
366
366
[],
367
367
MethodGenerator::FLAG_PUBLIC | MethodGenerator::FLAG_STATIC ,
368
368
new BodyGenerator ($ this ->parser , \sprintf ('return new self(self::%s); ' , ($ this ->constNameFilter )($ enumValue )))
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ public function setUp(): void
45
45
$ filterConstValue ->attach (new Filter \Word \SeparatorToSeparator (' ' , '- ' ));
46
46
$ filterConstValue ->attach (new Filter \Word \UnderscoreToCamelCase ());
47
47
$ filterConstValue ->attach (new Filter \Word \DashToCamelCase ());
48
+ $ filterConstValue ->attach (function (string $ value ) { return \lcfirst ($ value ); });
48
49
49
50
$ this ->filterConstValue = $ filterConstValue ;
50
51
You can’t perform that action at this time.
0 commit comments