This commit is contained in:
Julien Fastré 2022-03-06 22:36:38 +01:00
parent 739c7e9a77
commit 7afada5dad
3 changed files with 3 additions and 2 deletions

View File

@ -92,9 +92,11 @@ final class PhonenumberHelper implements PhoneNumberHelperInterface
switch ($this->phoneNumberUtil->getNumberType($phonenumber)) { switch ($this->phoneNumberUtil->getNumberType($phonenumber)) {
case PhoneNumberType::MOBILE: case PhoneNumberType::MOBILE:
return 'mobile'; return 'mobile';
case PhoneNumberType::FIXED_LINE: case PhoneNumberType::FIXED_LINE:
case PhoneNumberType::VOIP: case PhoneNumberType::VOIP:
return 'landline'; return 'landline';
default: default:
return 'landline'; return 'landline';
} }

View File

@ -98,7 +98,7 @@ class PersonPhone
public function isEmpty(): bool public function isEmpty(): bool
{ {
return ("" === $this->getDescription() || null === $this->getDescription()) return ('' === $this->getDescription() || null === $this->getDescription())
&& null === $this->getPhonenumber(); && null === $this->getPhonenumber();
} }

View File

@ -16,7 +16,6 @@ use Chill\MainBundle\Phonenumber\PhonenumberHelper;
use Chill\PersonBundle\Entity\PersonPhone; use Chill\PersonBundle\Entity\PersonPhone;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\TelType;
use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\FormEvent;