DatabasesResponse   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 48
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 48
loc 48
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0
wmc 4
lcom 0
cbo 1

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getItems() 4 4 1
A getLimit() 4 4 1
A getOffset() 4 4 1
A getTotal() 4 4 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
/**
3
 * Yandex PHP Library
4
 *
5
 * @copyright NIX Solutions Ltd.
6
 * @link      https://github.com/nixsolutions/yandex-php-library
7
 */
8
namespace Yandex\DataSync\Responses;
9
10
use Yandex\Common\Model;
11
12
/**
13
 * Class DatabasesResponse
14
 *
15
 * @package  Yandex\DataSync\Responses
16
 * @author   Alexander Khaylo <[email protected]>
17
 */
18 View Code Duplication
class DatabasesResponse extends Model
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
19
{
20
    protected $items = null;
21
22
    protected $total = null;
23
24
    protected $limit = null;
25
26
    protected $offset = null;
27
28
    protected $mappingClasses = [
29
        'items' => 'Yandex\DataSync\Models\Databases',
30
    ];
31
32
    /**
33
     * An array of objects containing information about existing databases.
34
     *
35
     * @return \Yandex\DataSync\Models\Databases
36
     */
37 2
    public function getItems()
38
    {
39 2
        return $this->items;
40
    }
41
42
    /**
43
     * @return null
44
     */
45 2
    public function getLimit()
46
    {
47 2
        return $this->limit;
48
    }
49
50
    /**
51
     * @return null
52
     */
53 2
    public function getOffset()
54
    {
55 2
        return $this->offset;
56
    }
57
58
    /**
59
     * @return null
60
     */
61 2
    public function getTotal()
62
    {
63 2
        return $this->total;
64
    }
65
}
66