AdventureFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 13
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 7 1
1
<?php
2
3
namespace Badger\Bundle\GameBundle\Factory;
4
5
use Badger\Bundle\GameBundle\Entity\Adventure;
6
use Badger\Bundle\GameBundle\Entity\AdventureStep;
7
use Badger\Component\Game\Factory\SimpleFactoryInterface;
8
9
/**
10
 * @author  Marie Bochu <[email protected]>
11
 * @license http://opensource.org/licenses/MIT The MIT License (MIT)
12
 */
13
class AdventureFactory implements SimpleFactoryInterface
14
{
15
    /**
16
     * {@inheritdoc}
17
     */
18
    public function create()
19
    {
20
        $adventure = new Adventure();
21
        $adventure->addStep(new AdventureStep());
22
23
        return $adventure;
24
    }
25
}
26