Test Setup Failed
Push — master ( a3a234...e290ee )
by Gerhard
15:04 queued 07:19
created

ProductManager::generateCode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: gseidel
5
 * Date: 30.10.18
6
 * Time: 18:24
7
 */
8
9
namespace Enhavo\Bundle\ShopBundle\Manager;
10
11
use Enhavo\Bundle\AppBundle\Util\NameTransformer;
12
13
class ProductManager
14
{
15
    /** @var NameTransformer */
16
    private $nameTransformer;
17
18
    /**
19
     * ProductManager constructor.
20
     */
21
    public function __construct()
22
    {
23
        $this->nameTransformer = new NameTransformer();
24
    }
25
26
    public function generateCode($name)
27
    {
28
        return $this->nameTransformer->kebabCase($name);
29
    }
30
}
31