forked from GNUsocial/gnu-social
[DATABASE][TOOLS] Update local_user to return the proper PhoneNumber type
This commit is contained in:
parent
22e292276c
commit
59eba851f7
@ -20,7 +20,7 @@ const types = [
|
||||
'serial' => 'int',
|
||||
'text' => 'string',
|
||||
'varchar' => 'string',
|
||||
'phone_number' => 'PhoneNumberType',
|
||||
'phone_number' => 'PhoneNumber',
|
||||
];
|
||||
|
||||
$path = Yaml::parseFile(ROOT . '/config/services.yaml')['services']['app.core.schemadef_driver']['arguments'][0];
|
||||
|
@ -25,6 +25,7 @@ use App\Util\Common;
|
||||
use DateTime;
|
||||
use DateTimeInterface;
|
||||
use Exception;
|
||||
use libphonenumber\PhoneNumber;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
|
||||
/**
|
||||
@ -52,7 +53,7 @@ class LocalUser implements UserInterface
|
||||
private ?bool $is_email_verified;
|
||||
private ?string $language;
|
||||
private ?string $timezone;
|
||||
private ?PhoneNumberType $phone_number;
|
||||
private ?PhoneNumber $phone_number;
|
||||
private ?int $sms_carrier;
|
||||
private ?string $sms_email;
|
||||
private ?string $uri;
|
||||
@ -132,12 +133,12 @@ class LocalUser implements UserInterface
|
||||
return $this->timezone;
|
||||
}
|
||||
|
||||
public function setPhoneNumber(?PhoneNumberType $phone_number): self
|
||||
public function setPhoneNumber(?PhoneNumber $phone_number): self
|
||||
{
|
||||
$this->phone_number = $phone_number;
|
||||
return $this;
|
||||
}
|
||||
public function getPhoneNumber(): ?PhoneNumberType
|
||||
public function getPhoneNumber(): ?PhoneNumber
|
||||
{
|
||||
return $this->phone_number;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user