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.

Application   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 41
ccs 0
cts 11
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A factorySdk() 0 6 1
A appendCommand() 0 6 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\Console;
16
17
use Gpupo\CnovaSdk\Factory;
18
use Gpupo\CommonSdk\Console\AbstractApplication;
19
20
class Application extends AbstractApplication
21
{
22
    protected $commonParameters = [
23
        [
24
            'key' => 'client_id',
25
        ],
26
        [
27
            'key' => 'access_token',
28
        ],
29
        [
30
            'key'     => 'env',
31
            'options' => ['sandbox', 'api'],
32
            'default' => 'sandbox',
33
            'name'    => 'Version',
34
        ],
35
        [
36
            'key'     => 'sslVersion',
37
            'options' => ['SecureTransport', 'TLS'],
38
            'default' => 'SecureTransport',
39
            'name'    => 'SSL Version',
40
        ],
41
        [
42
            'key'     => 'registerPath',
43
            'default' => false,
44
        ],
45
    ];
46
47
    public function factorySdk(array $options)
48
    {
49
        $options['version'] = $options['env'];
50
51
        return  Factory::getInstance()->setup($options, $this->factoryLogger());
52
    }
53
54
    public function appendCommand($name, $description, array $definition = [])
55
    {
56
        return $this->register($name)
57
            ->setDescription($description)
58
            ->setDefinition($this->factoryDefinition($definition));
59
    }
60
}
61