LoadEventData   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 19 1
1
<?php
2
3
namespace BCRM\BackendBundle\Tests\DataFixtures\ORM;
4
5
use Doctrine\Common\DataFixtures\FixtureInterface;
6
use Doctrine\Common\Persistence\ObjectManager;
7
8
use BCRM\BackendBundle\Entity\Event\Event;
9
10
class LoadEventData implements FixtureInterface
11
{
12
    /**
13
     * {@inheritDoc}
14
     */
15
    public function load(ObjectManager $manager)
16
    {
17
        $bcrm13 = new Event();
18
        $bcrm13->setCapacity(3);
19
        $bcrm13->setName('BarCamp RheinMain 2013 Dieburg 23./24.11.2013');
20
        $bcrm13->setRegistrationStart(new \DateTime('2013-10-14T08:00:00+02:00'));
21
        $bcrm13->setPrice(1000);
22
        $regEnd = new \DateTime();
23
        $regEnd->modify('+1 day');
24
        $bcrm13->setRegistrationEnd($regEnd);
25
        // During our tests we will simulate the sunday
26
        $start = new \DateTime();
27
        $start->setTime(8, 0, 0);
28
        $start->modify('-1day');
29
        $bcrm13->setStart($start);
30
31
        $manager->persist($bcrm13);
32
        $manager->flush();
33
    }
34
}
35