mirror of
https://github.com/rectorphp/rector.git
synced 2024-07-30 21:30:23 +00:00
add more cases
This commit is contained in:
parent
31302f6835
commit
fa878f0af7
@ -1,6 +1,7 @@
|
||||
services:
|
||||
# yaml
|
||||
# covers https://github.com/symfony/symfony/blob/3.4/UPGRADE-3.2.md#yaml
|
||||
# https://github.com/symfony/symfony/pull/19504
|
||||
Rector\Symfony\Rector\Yaml\SpaceBetweenKeyAndValueYamlRector: ~
|
||||
|
||||
# dependency-injection
|
||||
|
@ -11,8 +11,9 @@ final class SpaceBetweenKeyAndValueYamlRector implements YamlRectorInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
* @see https://regex101.com/r/UDlB41/2/
|
||||
*/
|
||||
private const KEY_WITHOUT_SPACE_AFTER_PATTERN = '#(\w+)\:(\/?\w+)#';
|
||||
private const KEY_WITHOUT_SPACE_AFTER_PATTERN = '#(\w+):([^ ,\[\]{}:\n])#';
|
||||
|
||||
public function getDefinition(): RectorDefinition
|
||||
{
|
||||
|
@ -4,4 +4,8 @@ key:
|
||||
about_us:
|
||||
key: value
|
||||
key: /value
|
||||
controller: App\Controller\CompanyController::about
|
||||
controller: App\Controller\CompanyController::about
|
||||
|
||||
{1: ""}
|
||||
|
||||
{foo: bar,bar: foo,false: false,null: null,integer: 12}
|
||||
|
@ -4,4 +4,8 @@ key:
|
||||
about_us:
|
||||
key:value
|
||||
key:/value
|
||||
controller: App\Controller\CompanyController::about
|
||||
controller: App\Controller\CompanyController::about
|
||||
|
||||
{1:""}
|
||||
|
||||
{foo:bar,bar:foo,false:false,null:null,integer:12}
|
||||
|
Loading…
Reference in New Issue
Block a user