Completed
Push — master ( d67f41...79042b )
by Adam
07:27
created

NewsCategory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A translate() 0 4 1
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 Knp\DoctrineBehaviors\Model\Timestampable\Timestampable;
16
use Knp\DoctrineBehaviors\Model\Translatable\Translatable;
17
use WellCommerce\Bundle\CoreBundle\Doctrine\Behaviours\Identifiable;
18
use WellCommerce\Bundle\CoreBundle\Entity\EntityInterface;
19
20
/**
21
 * Class NewsCategory
22
 *
23
 * @author  Adam Piotrowski <[email protected]>
24
 */
25
class NewsCategory implements EntityInterface
26
{
27
    use Identifiable;
28
    use Translatable;
29
    use Timestampable;
30
    
31
    public function translate($locale = null, $fallbackToDefault = true): NewsCategoryTranslation
32
    {
33
        return $this->doTranslate($locale, $fallbackToDefault);
34
    }
35
}
36