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.

InputString   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 2
dl 0
loc 30
ccs 13
cts 13
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getCleanStringValue() 0 12 2
A getFirst() 0 4 1
A getSecond() 0 4 1
A getCosts() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of gpupo/similarity
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://www.gpupo.com/>.
13
 */
14
15
namespace Gpupo\Similarity\Input;
16
17
class InputString extends InputAbstract implements InputInterface
18
{
19 39
    protected function getCleanStringValue($key)
20
    {
21 39
        $d = new Decorator();
22 39
        $value = $this->get($key);
23 39
        $string = $d->stripIgnoredCharacters($value);
24
25 39
        if ($this->getStopwords()) {
26 6
            return $d->stripStopwords($string, $this->getStopwords());
27
        }
28
29 33
        return $string;
30
    }
31
32 82
    public function getFirst()
33
    {
34 82
        return $this->getCleanStringValue('first');
35
    }
36
37 68
    public function getSecond()
38
    {
39 68
        return $this->getCleanStringValue('second');
40
    }
41
42 23
    public function getCosts()
43
    {
44 23
        return $this->get('costs');
45
    }
46
}
47