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

LoadLanguageData   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 19
ccs 0
cts 8
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 9 1
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