<commit_before><?php

namespace Oro\Bundle\AddressBundle\Entity;

use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;

use BeSimple\SoapBundle\ServiceDefinition\Annotation as Soap;

use Oro\Bundle\FormBundle\Entity\PrimaryItem;

/**
 * Typed Address
 *
 * @ORM\MappedSuperclass
 */
abstract class AbstractTypedAddress extends AbstractAddress implements PrimaryItem
{
    /**
     * Many-to-many relation field, relation parameters must be in specific class
     *
     * @var Collection
     *
     * @Soap\ComplexType("Oro\Bundle\AddressBundle\Entity\AddressType[]", nillable=true)
     */
    protected $types;

    /**
     * @var boolean
     *
     * @ORM\Column(name="is_primary", type="boolean", nullable=true)
     * @Soap\ComplexType("boolean", nillable=true)
     */
    protected $primary;

    public function __construct()
    {
        $this->types = new ArrayCollection();
        $this->primary = false;
    }

    /**
     * @return Collection|AddressType[]
     */
    public function getTypes()
    {
        return $this->types;
    }

    /**
     * @param ArrayCollection $types
     * @return AbstractTypedAddress
     */
    public function setTypes(ArrayCollection $types)
    {
        $this->types = $types;

        return $this;
    }

    /**
     * Get list of address types names
     *
     * @return array<commit_msg>CRM-1209: Billing, Shipping address' attribute is not synced with Magento in two way   - Fix Contact Import Helper<commit_after><?php

namespace Oro\Bundle\AddressBundle\Entity;

use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;

use BeSimple\SoapBundle\ServiceDefinition\Annotation as Soap;

use Oro\Bundle\FormBundle\Entity\PrimaryItem;

/**
 * Typed Address
 *
 * @ORM\MappedSuperclass
 */
abstract class AbstractTypedAddress extends AbstractAddress implements PrimaryItem
{
    /**
     * Many-to-many relation field, relation parameters must be in specific class
     *
     * @var Collection
     *
     * @Soap\ComplexType("Oro\Bundle\AddressBundle\Entity\AddressType[]", nillable=true)
     */
    protected $types;

    /**
     * @var boolean
     *
     * @ORM\Column(name="is_primary", type="boolean", nullable=true)
     * @Soap\ComplexType("boolean", nillable=true)
     */
    protected $primary;

    public function __construct()
    {
        $this->types = new ArrayCollection();
        $this->primary = false;
    }

    /**
     * @return Collection|AddressType[]
     */
    public function getTypes()
    {
        return $this->types;
    }

    /**
     * @param Collection $types
     * @return AbstractTypedAddress
     */
    public function setTypes(Collection $types)
    {
        $this->types = $types;

        return $this;
    }

    /**
     * Get list of address types names
     *
     * @return array
{'fraction_non_alphanumeric': 0.1152669160149609, 'fraction_numerical': 0.0013600816048962938, 'mean_word_length': 2.733502538071066, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3313650', 'n_tokens_mistral': 861, 'n_tokens_neox': 851, 'n_words': 191}