Completed
Pull Request — develop (#397)
by Lucas
30:55 queued 24:29
created

LoadLanguageData::load()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2
Metric Value
dl 0
loc 9
ccs 0
cts 8
cp 0
rs 9.6666
cc 1
eloc 6
nc 1
nop 1
crap 2
1
<?php
2
/**
3
 * /core/app fixtures for mongodb app collection.
4
 */
5
6
namespace Graviton\I18nBundle\DataFixtures\MongoDB;
7
8
use Doctrine\Common\DataFixtures\FixtureInterface;
9
use Doctrine\Common\Persistence\ObjectManager;
10
use Graviton\I18nBundle\Document\Language;
11
12
/**
13
 * Load Language data fixtures into mongodb
14
 *
15
 * @author   List of contributors <https://github.com/libgraviton/graviton/graphs/contributors>
16
 * @license  http://opensource.org/licenses/gpl-license.php GNU Public License
17
 * @link     http://swisscom.ch
18
 */
19
class LoadLanguageData implements FixtureInterface
20
{
21
    /**
22
     * {@inheritDoc}
23
     *
24
     * @param ObjectManager $manager Object Manager
25
     *
26
     * @return void
27
     */
28
    public function load(ObjectManager $manager)
29
    {
30
        $enTag = new Language;
31
        $enTag->setId('en');
32
        $enTag->setName('English');
33
34
        $manager->persist($enTag);
35
        $manager->flush();
36
    }
37
}
38