Completed
Push — master ( 6b87b2...6de35a )
by Adam
16:39 queued 03:06
created

Contact::__construct()   A

Complexity

Conditions 1
Paths 1

Duplication

Lines 0
Ratio 0 %

Size

Total Lines 4
Code Lines 2

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/*
3
 * WellCommerce Open-Source E-Commerce Platform
4
 *
5
 * This file is part of the WellCommerce package.
6
 *
7
 * (c) Adam Piotrowski <[email protected]>
8
 *
9
 * For the full copyright and license information,
10
 * please view the LICENSE file that was distributed with this source code.
11
 */
12
13
namespace WellCommerce\Bundle\CmsBundle\Entity;
14
15
use Doctrine\Common\Collections\ArrayCollection;
16
use Knp\DoctrineBehaviors\Model\Blameable\Blameable;
17
use Knp\DoctrineBehaviors\Model\Timestampable\Timestampable;
18
use Knp\DoctrineBehaviors\Model\Translatable\Translatable;
19
use WellCommerce\Bundle\AppBundle\Entity\ShopCollectionAwareTrait;
20
use WellCommerce\Bundle\CoreBundle\Doctrine\Behaviours\Enableable;
21
use WellCommerce\Bundle\CoreBundle\Doctrine\Behaviours\Identifiable;
22
use WellCommerce\Bundle\CoreBundle\Entity\EntityInterface;
23
24
/**
25
 * Class Contact
26
 *
27
 * @author  Adam Piotrowski <[email protected]>
28
 */
29
class Contact implements EntityInterface
30
{
31
    use Identifiable;
32
    use Enableable;
33
    use Translatable;
34
    use Timestampable;
35
    use Blameable;
36
    use ShopCollectionAwareTrait;
37
    
38
    public function __construct()
39
    {
40
        $this->shops = new ArrayCollection();
41
    }
42
    
43
    public function translate($locale = null, $fallbackToDefault = true): ContactTranslation
44
    {
45
        return $this->doTranslate($locale, $fallbackToDefault);
46
    }
47
}
48