QuestFactory::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\Quest;
6
use Badger\Component\Game\Factory\SimpleFactoryInterface;
7
use Doctrine\Common\Collections\ArrayCollection;
8
9
/**
10
 * Quest Factory
11
 *
12
 * @author  Olivier Soulet <[email protected]>
13
 * @license http://opensource.org/licenses/MIT The MIT License (MIT)
14
 */
15
class QuestFactory implements SimpleFactoryInterface
16
{
17
    /**
18
     * {@inheritdoc}
19
     */
20
    public function create()
21
    {
22
        $quest = new Quest();
23
        $quest->setTags(new ArrayCollection());
24
25
        return $quest;
26
    }
27
}
28