mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
php code style fix
This commit is contained in:
parent
7a6aa6edcb
commit
f2c60cfd20
@ -20,6 +20,7 @@ use Chill\PersonBundle\Form\PersonType;
|
||||
use Chill\PersonBundle\Privacy\PrivacyEvent;
|
||||
use Chill\PersonBundle\Repository\PersonRepository;
|
||||
use Chill\PersonBundle\Search\SimilarPersonMatcher;
|
||||
use DateTimeImmutable;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
||||
@ -33,8 +34,8 @@ use Symfony\Component\HttpFoundation\Session\SessionInterface;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
use Symfony\Component\Validator\Validator\ValidatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
use function count;
|
||||
use function hash;
|
||||
use function implode;
|
||||
@ -265,13 +266,12 @@ final class PersonController extends AbstractController
|
||||
$address = $form->get('address')->getData();
|
||||
$addressForm = $form->get('addressForm')->getData();
|
||||
|
||||
if(null !== $address and $addressForm){
|
||||
|
||||
if (null !== $address && $addressForm) {
|
||||
$household = new Household();
|
||||
|
||||
$member = new HouseholdMember();
|
||||
$member->setPerson($person);
|
||||
$member->setStartDate(new \DateTimeImmutable());
|
||||
$member->setStartDate(new DateTimeImmutable());
|
||||
|
||||
$household->addMember($member);
|
||||
$household->setForceAddress($address);
|
||||
|
@ -208,7 +208,8 @@ class HouseholdMember
|
||||
}
|
||||
|
||||
$this->position = $position;
|
||||
if (null !== $position){
|
||||
|
||||
if (null !== $position) {
|
||||
$this->shareHousehold = $position->getShareHousehold();
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,6 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\EmailType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
@ -84,11 +83,11 @@ final class CreationPersonType extends AbstractType
|
||||
->add('addressForm', CheckboxType::class, [
|
||||
'label' => 'Create a household and add an address',
|
||||
'required' => false,
|
||||
'mapped' => false
|
||||
'mapped' => false,
|
||||
])
|
||||
->add('address', PickAddressType::class, [
|
||||
'required' => false,
|
||||
'mapped' => false
|
||||
'mapped' => false,
|
||||
]);
|
||||
|
||||
if ($this->askCenters) {
|
||||
|
@ -137,7 +137,6 @@ class MembersEditor
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->membershipsAffected[] = $membership;
|
||||
$this->persistables[] = $membership;
|
||||
|
||||
|
@ -117,7 +117,7 @@ class MembersEditorNormalizer implements DenormalizerAwareInterface, Denormalize
|
||||
$context
|
||||
);
|
||||
|
||||
if (\array_key_exists('position', $concerned)) {
|
||||
if (array_key_exists('position', $concerned)) {
|
||||
$position = $this->denormalizer->denormalize(
|
||||
$concerned['position'] ?? null,
|
||||
Position::class,
|
||||
|
Loading…
x
Reference in New Issue
Block a user