cs: Second part - ignore test/app subdirectory.

This commit is contained in:
Pol Dellaiera
2021-11-23 14:34:34 +01:00
parent 5f37304796
commit 3ea35682eb
72 changed files with 326 additions and 365 deletions

View File

@@ -102,8 +102,7 @@ trait AppendScopeChoiceTypeTrait
TranslatableStringHelper $translatableStringHelper,
ObjectManager $om,
$name = 'scope'
)
{
) {
$reachableScopes = $authorizationHelper
->getReachableScopes($user, $role, $center);
@@ -119,21 +118,21 @@ trait AppendScopeChoiceTypeTrait
$builder->addEventListener(
FormEvents::PRE_SET_DATA,
function (FormEvent $event) use ($choices, $name, $dataTransformer, $builder) {
$form = $event->getForm();
$form->add(
$builder
->create(
$name,
ChoiceType::class,
[
'choices' => array_combine(array_values($choices), array_keys($choices)),
'auto_initialize' => false,
]
)
->addModelTransformer($dataTransformer)
->getForm()
);
}
$form = $event->getForm();
$form->add(
$builder
->create(
$name,
ChoiceType::class,
[
'choices' => array_combine(array_values($choices), array_keys($choices)),
'auto_initialize' => false,
]
)
->addModelTransformer($dataTransformer)
->getForm()
);
}
);
}
}

View File

@@ -58,8 +58,7 @@ class PickCenterType extends AbstractType
TokenStorageInterface $tokenStorage,
ExportManager $exportManager,
AuthorizationHelper $authorizationHelper
)
{
) {
$this->exportManager = $exportManager;
$this->user = $tokenStorage->getToken()->getUser();
$this->authorizationHelper = $authorizationHelper;

View File

@@ -105,14 +105,14 @@ class UserType extends AbstractType
} else {
$builder->add(
$builder
->create('enabled', ChoiceType::class, [
'choices' => [
'Disabled, the user is not allowed to login' => 0,
'Enabled, the user is active' => 1,
],
'expanded' => false,
'multiple' => false,
])
->create('enabled', ChoiceType::class, [
'choices' => [
'Disabled, the user is not allowed to login' => 0,
'Enabled, the user is active' => 1,
],
'expanded' => false,
'multiple' => false,
])
);
}
}