BadgeFactory::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace Badger\Bundle\GameBundle\Factory;
4
5
use Badger\Bundle\GameBundle\Entity\Badge;
6
use Badger\Component\Game\Factory\SimpleFactoryInterface;
7
use Doctrine\Common\Collections\ArrayCollection;
8
9
/**
10
 * @author  Adrien Pétremann <[email protected]>
11
 * @license http://opensource.org/licenses/MIT The MIT License (MIT)
12
 */
13
class BadgeFactory implements SimpleFactoryInterface
14
{
15
    /**
16
     * {@inheritdoc}
17
     */
18
    public function create()
19
    {
20
        $badge = new Badge();
21
        $badge->setTags(new ArrayCollection());
22
23
        return $badge;
24
    }
25
}
26