src/Entity/System/Address.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="App\Repository\System\AddressRepository")
  6.  *
  7.  * @ORM\Table(name="ps_address")
  8.  */
  9. class Address
  10. {
  11.     public const ISO_COUNTRY_SPAIN 'ES';
  12.     public const ACTIVE 1;
  13.     public const DEFAULT_ADDRESS 1;
  14.     public const INACTIVE 0;
  15.     public const TYPE_INDIVIDUAL 1;
  16.     public const TYPE_SELF_EMPLOYED 2;
  17.     public const TYPE_COMPANY 3;
  18.     public const CUSTOMER_TYPE_IDS_INDEXED_BY_TYPE_VALUES = [
  19.         'INDIVIDUAL' => self::TYPE_INDIVIDUAL,
  20.         'SELF_EMPLOYED' => self::TYPE_SELF_EMPLOYED,
  21.         'COMPANY' => self::TYPE_COMPANY,
  22.     ];
  23.     /**
  24.      * @var int
  25.      *
  26.      * @ORM\Id
  27.      *
  28.      * @ORM\GeneratedValue(strategy="AUTO")
  29.      *
  30.      * @ORM\Column(type="integer", name="id_address")
  31.      */
  32.     private $id;
  33.     /**
  34.      * @var Country
  35.      *
  36.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Country", inversedBy="addresses")
  37.      *
  38.      * @ORM\JoinColumn(referencedColumnName="id_country", name="id_country")
  39.      */
  40.     private $country;
  41.     /**
  42.      * @var State
  43.      *
  44.      * @ORM\ManyToOne(targetEntity="App\Entity\System\State")
  45.      *
  46.      * @ORM\JoinColumn(referencedColumnName="id_state", name="id_state", nullable=true)
  47.      */
  48.     private $state;
  49.     /**
  50.      * @var string|null
  51.      *
  52.      * @ORM\Column(type="string", length=50, name="state_name", nullable=true)
  53.      */
  54.     private $stateName;
  55.     /**
  56.      * @var int|null
  57.      *
  58.      * @ORM\Column(type="integer", name="id_manufacturer", length=10, options={"default" : 0})
  59.      */
  60.     private $manufacturer;
  61.     /**
  62.      * @var string|null
  63.      *
  64.      * @ORM\Column(type="string", length=32, nullable=true)
  65.      */
  66.     private $alias;
  67.     /**
  68.      * @var string|null
  69.      *
  70.      * @ORM\Column(type="string", length=64, nullable=true)
  71.      */
  72.     private $company;
  73.     /**
  74.      * @var string|null
  75.      *
  76.      * @ORM\Column(type="string", length=32, nullable=true)
  77.      */
  78.     private $name;
  79.     /**
  80.      * @var string
  81.      *
  82.      * @ORM\Column(type="string", length=128)
  83.      */
  84.     private $email;
  85.     /**
  86.      * @var string|null
  87.      *
  88.      * @ORM\Column(type="string", length=32, nullable=true)
  89.      */
  90.     private $surnames;
  91.     /**
  92.      * @var string
  93.      *
  94.      * @ORM\Column(type="string", length=128)
  95.      */
  96.     private $address1;
  97.     /**
  98.      * @var string|null
  99.      *
  100.      * @ORM\Column(type="string", length=128, nullable=true)
  101.      */
  102.     private $address2;
  103.     /**
  104.      * @var string|null
  105.      *
  106.      * @ORM\Column(type="string", length=12, nullable=true)
  107.      */
  108.     private $postcode;
  109.     /**
  110.      * @var string
  111.      *
  112.      * @ORM\Column(type="string", length=64)
  113.      */
  114.     private $city;
  115.     /**
  116.      * @var string|null
  117.      *
  118.      * @ORM\Column(type="text", nullable=true)
  119.      */
  120.     private $other;
  121.     /**
  122.      * @var string|null
  123.      *
  124.      * @ORM\Column(type="string", length=32, nullable=true)
  125.      */
  126.     private $phone;
  127.     /**
  128.      * @var string|null
  129.      *
  130.      * @ORM\Column(type="string", length=32, nullable=true)
  131.      */
  132.     private $phoneMobile;
  133.     /**
  134.      * @var string|null
  135.      *
  136.      * @ORM\Column(type="string", length=32, nullable=true)
  137.      */
  138.     private $vatNumber;
  139.     /**
  140.      * @var \DateTime
  141.      *
  142.      * @ORM\Column(type="datetime")
  143.      */
  144.     private $dateAdd;
  145.     /**
  146.      * @var \DateTime
  147.      *
  148.      * @ORM\Column(type="datetime")
  149.      */
  150.     private $dateUpd;
  151.     /**
  152.      * @var bool
  153.      *
  154.      * @ORM\Column(type="boolean", options={"default" : 1})
  155.      */
  156.     private $active;
  157.     /**
  158.      * @var bool
  159.      *
  160.      * @ORM\Column(type="boolean", options={"default" : 0})
  161.      */
  162.     private $invoiceAddress;
  163.     /**
  164.      * @var bool
  165.      *
  166.      * @ORM\Column(type="boolean", options={"default" : 0})
  167.      */
  168.     private $defaultInvoiceAddress;
  169.     /**
  170.      * @var bool
  171.      *
  172.      * @ORM\Column(type="boolean", options={"default" : 0})
  173.      */
  174.     private $defaultShippingAddress;
  175.     /**
  176.      * @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
  177.      */
  178.     private bool $vise;
  179.     /**
  180.      * @var bool|null
  181.      *
  182.      * @ORM\Column(type="boolean", length=4, nullable=true, options={"default" : 0})
  183.      */
  184.     private $re;
  185.     /**
  186.      * @var string|null
  187.      *
  188.      * @ORM\Column(type="string", length=3, nullable=true)
  189.      */
  190.     private $isoCode;
  191.     /**
  192.      * @var string|null
  193.      *
  194.      * @ORM\Column(type="string", length=128, nullable=true)
  195.      */
  196.     private $comercialName;
  197.     /**
  198.      * @var int|null
  199.      *
  200.      * @ORM\Column(type="integer",length=1, nullable=true, options={"default" : 1}))
  201.      */
  202.     private $typeCustomer;
  203.     /**
  204.      * @var string|null
  205.      *
  206.      * @ORM\Column(type="string", length=50, nullable=true, options={"default" : "1"})
  207.      */
  208.     private $contactName;
  209.     /**
  210.      * @var string|null
  211.      *
  212.      * @ORM\Column(type="string", length=50, nullable=true, options={"default" : "1"})
  213.      */
  214.     private $url;
  215.     /**
  216.      * @var int
  217.      *
  218.      * @ORM\Column(type="integer", length=10, options={"default" : 0})
  219.      */
  220.     private $phonePrefix;
  221.     /**
  222.      * @var int
  223.      *
  224.      * @ORM\Column(type="integer", length=10, options={"default" : 0})
  225.      */
  226.     private $phoneMobilePrefix;
  227.     /**
  228.      * @var int|null
  229.      *
  230.      * @ORM\Column(type="integer", length=4, nullable=true)
  231.      */
  232.     private $favorite;
  233.     /**
  234.      * @var string|null
  235.      *
  236.      * @ORM\Column(type="string", length=64, nullable=true)
  237.      */
  238.     private $companyName;
  239.     /**
  240.      * @var string|null
  241.      *
  242.      * @ORM\Column(type="string", length=3, nullable=true)
  243.      */
  244.     private $isoVatNumber;
  245.     /**
  246.      * @var Customer
  247.      *
  248.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Customer", inversedBy="addresses")
  249.      *
  250.      * @ORM\JoinColumn(name="id_customer", referencedColumnName="id_customer")
  251.      */
  252.     private $customer;
  253.     /**
  254.      * @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
  255.      */
  256.     private bool $companyVerified false;
  257.     public function __construct()
  258.     {
  259.         $this->dateUpd = new \DateTime();
  260.         $this->active true;
  261.         $this->invoiceAddress true;
  262.         $this->defaultInvoiceAddress false;
  263.         $this->defaultShippingAddress false;
  264.         $this->vise false;
  265.         $this->re false;
  266.         $this->typeCustomer true;
  267.         $this->contactName '1';
  268.         $this->phonePrefix 0;
  269.         $this->phoneMobilePrefix 0;
  270.         $this->favorite 0;
  271.         $this->manufacturer 0;
  272.     }
  273.     public static function createEmptyInvoiceAddress(string $customerEmail, \DateTime $dateTimeState $state): Address
  274.     {
  275.         $address = new self();
  276.         $address->email $customerEmail;
  277.         $address->address1 '';
  278.         $address->city '';
  279.         $address->dateAdd $dateTime;
  280.         $address->state $state;
  281.         $address->defaultInvoiceAddress true;
  282.         $address->invoiceAddress true;
  283.         return $address;
  284.     }
  285.     /**
  286.      * @return int
  287.      */
  288.     public function getId(): int
  289.     {
  290.         return $this->id;
  291.     }
  292.     /**
  293.      * @param int $id
  294.      *
  295.      * @return Address
  296.      */
  297.     public function setId(int $id): Address
  298.     {
  299.         $this->id $id;
  300.         return $this;
  301.     }
  302.     /**
  303.      * @return Country
  304.      */
  305.     public function getCountry(): Country
  306.     {
  307.         return $this->country;
  308.     }
  309.     /**
  310.      * @param Country $country
  311.      *
  312.      * @return Address
  313.      */
  314.     public function setCountry(Country $country): Address
  315.     {
  316.         $this->country $country;
  317.         return $this;
  318.     }
  319.     /**
  320.      * @return State
  321.      */
  322.     public function getState(): State
  323.     {
  324.         return $this->state;
  325.     }
  326.     /**
  327.      * @param State $state
  328.      *
  329.      * @return Address
  330.      */
  331.     public function setState(State $state): Address
  332.     {
  333.         $this->state $state;
  334.         return $this;
  335.     }
  336.     /**
  337.      * @return string|null
  338.      */
  339.     public function getStateName(): ?string
  340.     {
  341.         return $this->stateName;
  342.     }
  343.     /**
  344.      * @param string|null $stateName
  345.      *
  346.      * @return Address
  347.      */
  348.     public function setStateName(?string $stateName): Address
  349.     {
  350.         $this->stateName $stateName;
  351.         return $this;
  352.     }
  353.     /**
  354.      * @return string|null
  355.      */
  356.     public function getAlias(): ?string
  357.     {
  358.         return $this->alias;
  359.     }
  360.     /**
  361.      * @param string|null $alias
  362.      *
  363.      * @return Address
  364.      */
  365.     public function setAlias(?string $alias): Address
  366.     {
  367.         $this->alias $alias;
  368.         return $this;
  369.     }
  370.     /**
  371.      * @return string|null
  372.      */
  373.     public function getCompany(): ?string
  374.     {
  375.         return $this->company;
  376.     }
  377.     /**
  378.      * @param string|null $company
  379.      *
  380.      * @return Address
  381.      */
  382.     public function setCompany(?string $company): Address
  383.     {
  384.         $this->company $company;
  385.         return $this;
  386.     }
  387.     /**
  388.      * @return string|null
  389.      */
  390.     public function getName(): ?string
  391.     {
  392.         return $this->name;
  393.     }
  394.     /**
  395.      * @param string|null $name
  396.      *
  397.      * @return Address
  398.      */
  399.     public function setName(?string $name): Address
  400.     {
  401.         $this->name $name;
  402.         return $this;
  403.     }
  404.     /**
  405.      * @return string
  406.      */
  407.     public function getEmail(): string
  408.     {
  409.         return $this->email;
  410.     }
  411.     /**
  412.      * @param string $email
  413.      *
  414.      * @return Address
  415.      */
  416.     public function setEmail(string $email): Address
  417.     {
  418.         $this->email $email;
  419.         return $this;
  420.     }
  421.     /**
  422.      * @return string|null
  423.      */
  424.     public function getSurnames(): ?string
  425.     {
  426.         return $this->surnames;
  427.     }
  428.     /**
  429.      * @param string|null $surnames
  430.      *
  431.      * @return Address
  432.      */
  433.     public function setSurnames(?string $surnames): Address
  434.     {
  435.         $this->surnames $surnames;
  436.         return $this;
  437.     }
  438.     /**
  439.      * @return string
  440.      */
  441.     public function getAddress1(): string
  442.     {
  443.         return $this->address1;
  444.     }
  445.     /**
  446.      * @param string $address1
  447.      *
  448.      * @return Address
  449.      */
  450.     public function setAddress1(string $address1): Address
  451.     {
  452.         $this->address1 $address1;
  453.         return $this;
  454.     }
  455.     /**
  456.      * @return string|null
  457.      */
  458.     public function getAddress2(): ?string
  459.     {
  460.         return $this->address2;
  461.     }
  462.     /**
  463.      * @param string|null $address2
  464.      *
  465.      * @return Address
  466.      */
  467.     public function setAddress2(?string $address2): Address
  468.     {
  469.         $this->address2 $address2;
  470.         return $this;
  471.     }
  472.     /**
  473.      * @return string|null
  474.      */
  475.     public function getPostcode(): ?string
  476.     {
  477.         return $this->postcode;
  478.     }
  479.     /**
  480.      * @param string|null $postcode
  481.      *
  482.      * @return Address
  483.      */
  484.     public function setPostcode(?string $postcode): Address
  485.     {
  486.         $this->postcode $postcode;
  487.         return $this;
  488.     }
  489.     /**
  490.      * @return string
  491.      */
  492.     public function getCity(): string
  493.     {
  494.         return $this->city;
  495.     }
  496.     /**
  497.      * @param string $city
  498.      *
  499.      * @return Address
  500.      */
  501.     public function setCity(string $city): Address
  502.     {
  503.         $this->city $city;
  504.         return $this;
  505.     }
  506.     /**
  507.      * @return string|null
  508.      */
  509.     public function getOther(): ?string
  510.     {
  511.         return $this->other;
  512.     }
  513.     /**
  514.      * @param string|null $other
  515.      *
  516.      * @return Address
  517.      */
  518.     public function setOther(?string $other): Address
  519.     {
  520.         $this->other $other;
  521.         return $this;
  522.     }
  523.     /**
  524.      * @return string|null
  525.      */
  526.     public function getPhone(): ?string
  527.     {
  528.         return $this->phone;
  529.     }
  530.     /**
  531.      * @param string|null $phone
  532.      *
  533.      * @return Address
  534.      */
  535.     public function setPhone(?string $phone): Address
  536.     {
  537.         $this->phone $phone;
  538.         return $this;
  539.     }
  540.     /**
  541.      * @return string|null
  542.      */
  543.     public function getPhoneMobile(): ?string
  544.     {
  545.         return $this->phoneMobile;
  546.     }
  547.     /**
  548.      * @param string|null $phoneMobile
  549.      *
  550.      * @return Address
  551.      */
  552.     public function setPhoneMobile(?string $phoneMobile): Address
  553.     {
  554.         $this->phoneMobile $phoneMobile;
  555.         return $this;
  556.     }
  557.     /**
  558.      * @return string|null
  559.      */
  560.     public function getVatNumber(): ?string
  561.     {
  562.         return $this->vatNumber;
  563.     }
  564.     /**
  565.      * @param string|null $vatNumber
  566.      *
  567.      * @return Address
  568.      */
  569.     public function setVatNumber(?string $vatNumber): Address
  570.     {
  571.         $this->vatNumber preg_replace('/[^A-Za-z0-9]/i'''$vatNumber);
  572.         return $this;
  573.     }
  574.     /**
  575.      * @return \DateTime
  576.      */
  577.     public function getDateAdd(): \DateTime
  578.     {
  579.         return $this->dateAdd;
  580.     }
  581.     /**
  582.      * @param \DateTime $dateAdd
  583.      *
  584.      * @return Address
  585.      */
  586.     public function setDateAdd(\DateTime $dateAdd): Address
  587.     {
  588.         $this->dateAdd $dateAdd;
  589.         return $this;
  590.     }
  591.     /**
  592.      * @return \DateTime
  593.      */
  594.     public function getDateUpd(): \DateTime
  595.     {
  596.         return $this->dateUpd;
  597.     }
  598.     /**
  599.      * @param \DateTime $dateUpd
  600.      *
  601.      * @return Address
  602.      */
  603.     public function setDateUpd(\DateTime $dateUpd): Address
  604.     {
  605.         $this->dateUpd $dateUpd;
  606.         return $this;
  607.     }
  608.     /**
  609.      * @return bool
  610.      */
  611.     public function isActive(): bool
  612.     {
  613.         return $this->active;
  614.     }
  615.     /**
  616.      * @param bool $active
  617.      *
  618.      * @return Address
  619.      */
  620.     public function setActive(bool $active): Address
  621.     {
  622.         $this->active $active;
  623.         return $this;
  624.     }
  625.     /**
  626.      * @return bool
  627.      */
  628.     public function isInvoiceAddress(): bool
  629.     {
  630.         return $this->invoiceAddress;
  631.     }
  632.     /**
  633.      * @param bool $invoiceAddress
  634.      *
  635.      * @return Address
  636.      */
  637.     public function setInvoiceAddress(bool $invoiceAddress): Address
  638.     {
  639.         $this->invoiceAddress $invoiceAddress;
  640.         return $this;
  641.     }
  642.     /**
  643.      * @return bool
  644.      */
  645.     public function isDefaultInvoiceAddress(): bool
  646.     {
  647.         return $this->defaultInvoiceAddress;
  648.     }
  649.     /**
  650.      * @param bool $defaultInvoiceAddress
  651.      *
  652.      * @return Address
  653.      */
  654.     public function setDefaultInvoiceAddress(bool $defaultInvoiceAddress): Address
  655.     {
  656.         $this->defaultInvoiceAddress $defaultInvoiceAddress;
  657.         return $this;
  658.     }
  659.     /**
  660.      * @return bool
  661.      */
  662.     public function isDefaultShippingAddress(): bool
  663.     {
  664.         return $this->defaultShippingAddress;
  665.     }
  666.     /**
  667.      * @param bool $defaultShippingAddress
  668.      *
  669.      * @return Address
  670.      */
  671.     public function setDefaultShippingAddress(bool $defaultShippingAddress): Address
  672.     {
  673.         $this->defaultShippingAddress $defaultShippingAddress;
  674.         return $this;
  675.     }
  676.     /**
  677.      * @return bool|null
  678.      */
  679.     public function getVise(): ?bool
  680.     {
  681.         return $this->vise;
  682.     }
  683.     /**
  684.      * @param bool|null $vise
  685.      *
  686.      * @return Address
  687.      */
  688.     public function setVise(?bool $vise): Address
  689.     {
  690.         $this->vise $vise;
  691.         return $this;
  692.     }
  693.     public function getRe(): ?bool
  694.     {
  695.         return $this->re;
  696.     }
  697.     public function setRe(?bool $re): Address
  698.     {
  699.         $this->re $re;
  700.         return $this;
  701.     }
  702.     /**
  703.      * @return string|null
  704.      */
  705.     public function getIsoCode(): ?string
  706.     {
  707.         return $this->isoCode;
  708.     }
  709.     /**
  710.      * @param string|null $isoCode
  711.      *
  712.      * @return Address
  713.      */
  714.     public function setIsoCode(?string $isoCode): Address
  715.     {
  716.         $this->isoCode $isoCode;
  717.         return $this;
  718.     }
  719.     /**
  720.      * @return string|null
  721.      */
  722.     public function getComercialName(): ?string
  723.     {
  724.         return $this->comercialName;
  725.     }
  726.     /**
  727.      * @param string|null $comercialName
  728.      *
  729.      * @return Address
  730.      */
  731.     public function setComercialName(?string $comercialName): Address
  732.     {
  733.         $this->comercialName $comercialName;
  734.         return $this;
  735.     }
  736.     /**
  737.      * @return int|null
  738.      */
  739.     public function getTypeCustomer(): ?int
  740.     {
  741.         return $this->typeCustomer;
  742.     }
  743.     /**
  744.      * @param int $typeCustomer
  745.      *
  746.      * @return Address
  747.      */
  748.     public function setTypeCustomer(int $typeCustomer): Address
  749.     {
  750.         $this->typeCustomer $typeCustomer;
  751.         return $this;
  752.     }
  753.     /**
  754.      * @return string|null
  755.      */
  756.     public function getContactName(): ?string
  757.     {
  758.         return $this->contactName;
  759.     }
  760.     /**
  761.      * @param string|null $contactName
  762.      *
  763.      * @return Address
  764.      */
  765.     public function setContactName(?string $contactName): Address
  766.     {
  767.         $this->contactName $contactName;
  768.         return $this;
  769.     }
  770.     /**
  771.      * @return string|null
  772.      */
  773.     public function getUrl(): ?string
  774.     {
  775.         return $this->url;
  776.     }
  777.     /**
  778.      * @param string|null $url
  779.      *
  780.      * @return Address
  781.      */
  782.     public function setUrl(?string $url): Address
  783.     {
  784.         $this->url $url;
  785.         return $this;
  786.     }
  787.     /**
  788.      * @return int
  789.      */
  790.     public function getPhonePrefix(): int
  791.     {
  792.         return $this->phonePrefix;
  793.     }
  794.     /**
  795.      * @param int $phonePrefix
  796.      *
  797.      * @return Address
  798.      */
  799.     public function setPhonePrefix(int $phonePrefix): Address
  800.     {
  801.         $this->phonePrefix $phonePrefix;
  802.         return $this;
  803.     }
  804.     /**
  805.      * @return int
  806.      */
  807.     public function getPhoneMobilePrefix(): int
  808.     {
  809.         return $this->phoneMobilePrefix;
  810.     }
  811.     /**
  812.      * @param int $phoneMobilePrefix
  813.      *
  814.      * @return Address
  815.      */
  816.     public function setPhoneMobilePrefix(int $phoneMobilePrefix): Address
  817.     {
  818.         $this->phoneMobilePrefix $phoneMobilePrefix;
  819.         return $this;
  820.     }
  821.     /**
  822.      * @return int|null
  823.      */
  824.     public function getFavorite(): ?int
  825.     {
  826.         return $this->favorite;
  827.     }
  828.     /**
  829.      * @param int|null $favorite
  830.      *
  831.      * @return Address
  832.      */
  833.     public function setFavorite(?int $favorite): Address
  834.     {
  835.         $this->favorite $favorite;
  836.         return $this;
  837.     }
  838.     /**
  839.      * @return string|null
  840.      */
  841.     public function getCompanyName(): ?string
  842.     {
  843.         return $this->companyName;
  844.     }
  845.     /**
  846.      * @param string|null $companyName
  847.      *
  848.      * @return Address
  849.      */
  850.     public function setCompanyName(?string $companyName): Address
  851.     {
  852.         $this->companyName $companyName;
  853.         return $this;
  854.     }
  855.     public function getCustomer(): ?Customer
  856.     {
  857.         return $this->customer;
  858.     }
  859.     public function setCustomer(?Customer $customer): self
  860.     {
  861.         $this->customer $customer;
  862.         return $this;
  863.     }
  864.     /**
  865.      * @return int|null
  866.      */
  867.     public function getManufacturer(): ?int
  868.     {
  869.         return $this->manufacturer;
  870.     }
  871.     /**
  872.      * @param int|null $manufacturer
  873.      *
  874.      * @return Address
  875.      */
  876.     public function setManufacturer(?int $manufacturer): self
  877.     {
  878.         $this->manufacturer $manufacturer;
  879.         return $this;
  880.     }
  881.     /**
  882.      * @return string|null
  883.      */
  884.     public function getIsoVatNumber(): ?string
  885.     {
  886.         return $this->isoVatNumber;
  887.     }
  888.     /**
  889.      * @param string|null $isoVatNumber
  890.      *
  891.      * @return Address
  892.      */
  893.     public function setIsoVatNumber(?string $isoVatNumber): self
  894.     {
  895.         $this->isoVatNumber $isoVatNumber;
  896.         return $this;
  897.     }
  898.     public function setAccountCreationStep3(
  899.         string $address,
  900.         string $city,
  901.         string $postCode,
  902.         State $state,
  903.         ?string $stateName,
  904.         Country $country,
  905.         string $vat,
  906.         ?string $companyName,
  907.         ?string $socialName,
  908.         ?bool $equivalenceSurcharge,
  909.         string $userType
  910.     ): Address {
  911.         $this->address1 $address;
  912.         $this->city $city;
  913.         $this->postcode $postCode;
  914.         $this->state $state;
  915.         $this->stateName $stateName;
  916.         $this->isoVatNumber $country->getIsoCode();
  917.         $this->vatNumber $vat;
  918.         $typeCustomerId self::CUSTOMER_TYPE_IDS_INDEXED_BY_TYPE_VALUES[$userType];
  919.         $this->typeCustomer $typeCustomerId;
  920.         if (self::TYPE_COMPANY === $typeCustomerId) {
  921.             $this->company $socialName;
  922.             $this->companyName $companyName;
  923.         }
  924.         if (self::TYPE_SELF_EMPLOYED === $typeCustomerId) {
  925.             $this->company $socialName;
  926.             $this->re $equivalenceSurcharge;
  927.         }
  928.         return $this;
  929.     }
  930.     public function isCompanyVerified(): bool
  931.     {
  932.         return $this->companyVerified;
  933.     }
  934.     public function setCompanyVerified(bool $companyVerified): Address
  935.     {
  936.         $this->companyVerified $companyVerified;
  937.         return $this;
  938.     }
  939.     public function getFullName(): ?string
  940.     {
  941.         return $this->name.' '.$this->surnames;
  942.     }
  943. }