-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f77daa6
commit 53db50c
Showing
4 changed files
with
54 additions
and
4 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
...ity/Rector/Closure/StringExtensionToConfigBuilderRector/Fixture/security_provider.php.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace Rector\Symfony\Tests\Rector\Closure\StringExtensionToConfigBuilderRector\Fixture; | ||
|
||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; | ||
|
||
return static function (ContainerConfigurator $containerConfigurator): void { | ||
|
||
$containerConfigurator->extension('security', [ | ||
'entity' => [ | ||
'class' => 'App\SomeClass', | ||
'property' => 'apiKey', | ||
], | ||
]); | ||
}; | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Symfony\Tests\Rector\Closure\StringExtensionToConfigBuilderRector\Fixture; | ||
|
||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; | ||
|
||
return static function (\Symfony\Config\SecurityConfig $securityConfig): void { | ||
|
||
$securityConfig->entity()->class('App\SomeClass')->property('apiKey'); | ||
}; | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Rector\Symfony\Utils; | ||
|
||
final class StringUtils | ||
{ | ||
public static function underscoreToCamelCase(string $value): string | ||
{ | ||
$value = ucwords(str_replace(['-', '_'], ' ', $value)); | ||
$singleWord = str_replace(' ', '', $value); | ||
|
||
return lcfirst($singleWord); | ||
} | ||
} |