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
275275
276276 private function throwExceptionLine (string $ argumentName ): string
277277 {
278- $ name = ( $ this ->constValueFilter )($ argumentName );
278+ $ name = \ucfirst (( $ this ->constValueFilter )($ argumentName) );
279279
280280 return 'throw Invalid ' . $ name . '::for ' . $ name . '($ ' . $ argumentName . '); ' ;
281281 }
@@ -362,7 +362,7 @@ public function methodMagicToString(string $argumentName): MethodGenerator
362362 public function methodEnumNamedConstructor (string $ enumValue ): MethodGenerator
363363 {
364364 $ method = new MethodGenerator (
365- \lcfirst (( $ this ->constValueFilter )($ enumValue) ),
365+ ( $ this ->constValueFilter )($ enumValue ),
366366 [],
367367 MethodGenerator::FLAG_PUBLIC | MethodGenerator::FLAG_STATIC ,
368368 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
4545 $ filterConstValue ->attach (new Filter \Word \SeparatorToSeparator (' ' , '- ' ));
4646 $ filterConstValue ->attach (new Filter \Word \UnderscoreToCamelCase ());
4747 $ filterConstValue ->attach (new Filter \Word \DashToCamelCase ());
48+ $ filterConstValue ->attach (function (string $ value ) { return \lcfirst ($ value ); });
4849
4950 $ this ->filterConstValue = $ filterConstValue ;
5051
You can’t perform that action at this time.
0 commit comments