Completed
Push — master ( e868c1...ebc742 )
by Gilmar
23:40
created

Factory::getSchema()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 24
Code Lines 16

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 10
CRAP Score 1

Importance

Changes 7
Bugs 0 Features 0
Metric Value
c 7
b 0
f 0
dl 0
loc 24
rs 8.9713
ccs 10
cts 10
cp 1
cc 1
eloc 16
nc 1
nop 1
crap 1
1
<?php
2
3
/*
4
 * This file is part of gpupo/netshoes-sdk
5
 * Created by Gilmar Pupo <[email protected]>
6
 * For the information of copyright and license you should read the file
7
 * LICENSE which is distributed with this source code.
8
 * Para a informação dos direitos autorais e de licença você deve ler o arquivo
9
 * LICENSE que é distribuído com este código-fonte.
10
 * Para obtener la información de los derechos de autor y la licencia debe leer
11
 * el archivo LICENSE que se distribuye con el código fuente.
12
 * For more information, see <http://www.g1mr.com/>.
13
 */
14
15
namespace Gpupo\NetshoesSdk;
16
17
use Gpupo\CommonSdk\FactoryAbstract;
18
use Gpupo\NetshoesSdk\Client\Client;
19
20
class Factory extends FactoryAbstract
21
{
22 1
    public function setClient(array $clientOptions = [])
23
    {
24 1
        $this->client = new Client($clientOptions, $this->logger);
25 1
    }
26
27 12
    public function getNamespace()
28
    {
29 12
        return '\Gpupo\NetshoesSdk\Entity\\';
30
    }
31
32 12
    protected function getSchema($namespace = null)
33
    {
34
        return [
35
            'product' => [
36 12
                'class'   => $namespace.'Product\Product',
37 12
                'manager' => $namespace.'Product\Manager',
38
            ],
39
            'sku' => [
40 12
                'class'   => $namespace.'Product\Sku\Item',
41 12
                'manager' => $namespace.'Product\Sku\Manager',
42
            ],
43
            'order' => [
44 12
                'class'   => $namespace.'Order\Order',
45 12
                'manager' => $namespace.'Order\Manager',
46
            ],
47
            'invoice' => [
48 12
                'class'   => $namespace.'Order\Shippings\Invoice',
49
            ],
50
            'templates' => [
51 12
                'class'   => $namespace.'Templates\Templates',
52 12
                'manager' => $namespace.'Templates\Manager',
53
            ],
54
        ];
55
    }
56
}
57