Completed
Push — master ( 79d213...eeff33 )
by Kamil
23:15
created

ThemeFactory::createFromArray()   B

Complexity

Conditions 5
Paths 16

Size

Total Lines 26
Code Lines 13

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 26
rs 8.439
cc 5
eloc 13
nc 16
nop 1
1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Sylius\Bundle\ThemeBundle\Factory;
13
14
use Sylius\Bundle\ThemeBundle\Model\ThemeInterface;
15
use Sylius\Component\Resource\Factory\Factory;
16
17
/**
18
 * @author Kamil Kokot <[email protected]>
19
 */
20
final class ThemeFactory extends Factory implements ThemeFactoryInterface
21
{
22
    /**
23
     * {@inheritdoc}
24
     */
25
    public function createNamed($name)
26
    {
27
        /** @var ThemeInterface $theme */
28
        $theme = $this->createNew();
29
        $theme->setName($name);
30
31
        return $theme;
32
    }
33
}
34