Items::getMetrics()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 4
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Yandex\Metrica\Stat\Models;
4
5
use Yandex\Metrica\Stat\Models\Dimensions;
6
use Yandex\Common\Model;
7
8 View Code Duplication
class Items 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...
9
{
10
11
    protected $dimensions = null;
12
13
    protected $metrics = null;
14
15
    protected $mappingClasses = [
16
        'dimensions' => 'Yandex\Metrica\Stat\Models\Dimensions'
17
    ];
18
19
    protected $propNameMap = [];
20
21
    /**
22
     * Retrieve the dimensions property
23
     *
24
     * @return Dimensions|null
25
     */
26 7
    public function getDimensions()
27
    {
28 7
        return $this->dimensions;
29
    }
30
31
    /**
32
     * Set the dimensions property
33
     *
34
     * @param Dimensions $dimensions
35
     * @return $this
36
     */
37 7
    public function setDimensions($dimensions)
38
    {
39 7
        $this->dimensions = $dimensions;
40 7
        return $this;
41
    }
42
43
    /**
44
     * Retrieve the metrics property
45
     *
46
     * @return array|null
47
     */
48 9
    public function getMetrics()
49
    {
50 9
        return $this->metrics;
51
    }
52
53
    /**
54
     * Set the metrics property
55
     *
56
     * @param array $metrics
57
     * @return $this
58
     */
59 7
    public function setMetrics($metrics)
60
    {
61 7
        $this->metrics = $metrics;
62 7
        return $this;
63
    }
64
}
65