Skip to content

Commit

Permalink
Less strict
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Jul 28, 2024
1 parent 7c49b94 commit dd03903
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Util/StringUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static function toSnakeCase(string $string): string

public static function toCamelCase(string $string): string
{
return (new UnicodeString(static::toSnakeCase($string)))->camel()->toString();
return (new UnicodeString($string))->camel()->toString();
}

public static function toPascalCase(string $string): string
Expand Down
1 change: 0 additions & 1 deletion tests/Rules/Variable/VariableName/VariableNameRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ public function testRulePascalCase(): void
'VariableName.Error:6:8' => 'The var name must use PascalCase; expected UserFoo.',
'VariableName.Error:7:8' => 'The var name must use PascalCase; expected KeyFoo.',
'VariableName.Error:7:16' => 'The var name must use PascalCase; expected UserFoo.',
'VariableName.Error:9:8' => 'The var name must use PascalCase; expected FooBar.',
'VariableName.Error:11:8' => 'The var name must use PascalCase; expected FooBar.',
'VariableName.Error:12:8' => 'The var name must use PascalCase; expected FooBar.',
]);
Expand Down
8 changes: 4 additions & 4 deletions tests/Util/StringUtilTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static function toCamelCaseDataProvider(): iterable
yield ['foo_bar', 'fooBar'];
yield ['foo-bar', 'fooBar'];
yield ['FooBar', 'fooBar'];
yield ['FOOBar', 'fooBar'];
yield ['FOOBar', 'FOOBar'];
yield ['foo1bar', 'foo1bar'];
yield ['foo1Bar', 'foo1Bar'];
yield ['foo_bar1', 'fooBar1'];
Expand All @@ -72,7 +72,7 @@ public static function toCamelCaseDataProvider(): iterable
yield ['foo__bar', 'fooBar'];
yield ['_foo_bar_', 'fooBar'];
yield ['foo bar', 'fooBar'];
yield ['FOO BAR', 'fooBar'];
yield ['FOO BAR', 'FOOBAR'];
yield ['foo#/+bar', 'fooBar'];
}

Expand All @@ -94,7 +94,7 @@ public static function toPascalCaseDataProvider(): iterable
yield ['foo_bar', 'FooBar'];
yield ['foo-bar', 'FooBar'];
yield ['FooBar', 'FooBar'];
yield ['FOOBar', 'FooBar'];
yield ['FOOBar', 'FOOBar'];
yield ['foo1bar', 'Foo1bar'];
yield ['foo1Bar', 'Foo1Bar'];
yield ['foo_bar1', 'FooBar1'];
Expand All @@ -106,7 +106,7 @@ public static function toPascalCaseDataProvider(): iterable
yield ['foo__bar', 'FooBar'];
yield ['_foo_bar_', 'FooBar'];
yield ['foo bar', 'FooBar'];
yield ['FOO BAR', 'FooBar'];
yield ['FOO BAR', 'FOOBAR'];
yield ['foo#/+bar', 'FooBar'];
}

Expand Down

0 comments on commit dd03903

Please sign in to comment.