GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Factory   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 75%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 30
ccs 9
cts 12
cp 0.75
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setClient() 0 4 1
A getNamespace() 0 4 1
A getSchema() 0 17 1
1
<?php
2
3
/*
4
 * This file is part of gpupo/cnova-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 <https://opensource.gpupo.com/>.
13
 */
14
15
namespace Gpupo\CnovaSdk;
16
17
use Gpupo\CnovaSdk\Client\Client;
18
use Gpupo\CommonSdk\FactoryAbstract;
19
20
class Factory extends FactoryAbstract
21
{
22
    public function setClient(array $clientOptions = [])
23
    {
24
        $this->client = new Client($clientOptions, $this->logger);
25
    }
26
27 38
    public function getNamespace()
28
    {
29 38
        return '\Gpupo\CnovaSdk\Entity\\';
30
    }
31
32 38
    protected function getSchema($namespace = null)
33
    {
34
        return [
35
            'product' => [
36 38
                'class'   => $namespace.'Product\Product',
37 38
                'manager' => $namespace.'Product\Manager',
38
            ],
39
            'order' => [
40 38
                'class'   => $namespace.'Order\Order',
41 38
                'manager' => $namespace.'Order\Manager',
42
            ],
43
            'loads' => [
44 38
                'class'   => $namespace.'Product\Loads\Loads',
45 38
                'manager' => $namespace.'Product\Loads\Manager',
46
            ],
47
        ];
48
    }
49
}
50