Completed
Pull Request — master (#155)
by Alexander
05:49
created

ComparisonItems::setMetrics()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 5
Ratio 100 %

Code Coverage

Tests 3
CRAP Score 1

Importance

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