Comparison::getSampleSize()   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\ComparisonQuery;
6
use Yandex\Metrica\Stat\Models\ComparisonData;
7
use Yandex\Metrica\Stat\Models\ComparisonTotals;
8
use Yandex\Common\Model;
9
10 View Code Duplication
class Comparison 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...
11
{
12
13
    protected $totalRows = null;
14
15
    protected $sampled = null;
16
17
    protected $sampleShare = null;
18
19
    protected $sampleSize = null;
20
21
    protected $sampleSpace = null;
22
23
    protected $dataLag = null;
24
25
    protected $query = null;
26
27
    protected $data = null;
28
29
    protected $totals = null;
30
31
    protected $mappingClasses = [
32
        'query' => 'Yandex\Metrica\Stat\Models\ComparisonQuery',
33
        'data' => 'Yandex\Metrica\Stat\Models\ComparisonData',
34
        'totals' => 'Yandex\Metrica\Stat\Models\ComparisonTotals'
35
    ];
36
37
    protected $propNameMap = [
38
        'total_rows' => 'totalRows',
39
        'sample_share' => 'sampleShare',
40
        'sample_size' => 'sampleSize',
41
        'sample_space' => 'sampleSpace',
42
        'data_lag' => 'dataLag'
43
    ];
44
45
    /**
46
     * Retrieve the totalRows property
47
     *
48
     * @return int|null
49
     */
50 2
    public function getTotalRows()
51
    {
52 2
        return $this->totalRows;
53
    }
54
55
    /**
56
     * Set the totalRows property
57
     *
58
     * @param int $totalRows
59
     * @return $this
60
     */
61 1
    public function setTotalRows($totalRows)
62
    {
63 1
        $this->totalRows = $totalRows;
64 1
        return $this;
65
    }
66
67
    /**
68
     * Retrieve the sampled property
69
     *
70
     * @return bool|null
71
     */
72 2
    public function getSampled()
73
    {
74 2
        return $this->sampled;
75
    }
76
77
    /**
78
     * Set the sampled property
79
     *
80
     * @param bool $sampled
81
     * @return $this
82
     */
83 1
    public function setSampled($sampled)
84
    {
85 1
        $this->sampled = $sampled;
86 1
        return $this;
87
    }
88
89
    /**
90
     * Retrieve the sampleShare property
91
     *
92
     * @return double|null
93
     */
94 2
    public function getSampleShare()
95
    {
96 2
        return $this->sampleShare;
97
    }
98
99
    /**
100
     * Set the sampleShare property
101
     *
102
     * @param double $sampleShare
103
     * @return $this
104
     */
105 1
    public function setSampleShare($sampleShare)
106
    {
107 1
        $this->sampleShare = $sampleShare;
108 1
        return $this;
109
    }
110
111
    /**
112
     * Retrieve the sampleSize property
113
     *
114
     * @return int|null
115
     */
116 2
    public function getSampleSize()
117
    {
118 2
        return $this->sampleSize;
119
    }
120
121
    /**
122
     * Set the sampleSize property
123
     *
124
     * @param int $sampleSize
125
     * @return $this
126
     */
127 1
    public function setSampleSize($sampleSize)
128
    {
129 1
        $this->sampleSize = $sampleSize;
130 1
        return $this;
131
    }
132
133
    /**
134
     * Retrieve the sampleSpace property
135
     *
136
     * @return int|null
137
     */
138 2
    public function getSampleSpace()
139
    {
140 2
        return $this->sampleSpace;
141
    }
142
143
    /**
144
     * Set the sampleSpace property
145
     *
146
     * @param int $sampleSpace
147
     * @return $this
148
     */
149 1
    public function setSampleSpace($sampleSpace)
150
    {
151 1
        $this->sampleSpace = $sampleSpace;
152 1
        return $this;
153
    }
154
155
    /**
156
     * Retrieve the dataLag property
157
     *
158
     * @return int|null
159
     */
160 2
    public function getDataLag()
161
    {
162 2
        return $this->dataLag;
163
    }
164
165
    /**
166
     * Set the dataLag property
167
     *
168
     * @param int $dataLag
169
     * @return $this
170
     */
171 1
    public function setDataLag($dataLag)
172
    {
173 1
        $this->dataLag = $dataLag;
174 1
        return $this;
175
    }
176
177
    /**
178
     * Retrieve the query property
179
     *
180
     * @return ComparisonQuery|null
181
     */
182 2
    public function getQuery()
183
    {
184 2
        return $this->query;
185
    }
186
187
    /**
188
     * Set the query property
189
     *
190
     * @param ComparisonQuery $query
191
     * @return $this
192
     */
193 1
    public function setQuery($query)
194
    {
195 1
        $this->query = $query;
196 1
        return $this;
197
    }
198
199
    /**
200
     * Retrieve the data property
201
     *
202
     * @return ComparisonData|null
203
     */
204 2
    public function getData()
205
    {
206 2
        return $this->data;
207
    }
208
209
    /**
210
     * Set the data property
211
     *
212
     * @param ComparisonData $data
213
     * @return $this
214
     */
215 1
    public function setData($data)
216
    {
217 1
        $this->data = $data;
218 1
        return $this;
219
    }
220
221
    /**
222
     * Retrieve the totals property
223
     *
224
     * @return ComparisonTotals|null
225
     */
226 2
    public function getTotals()
227
    {
228 2
        return $this->totals;
229
    }
230
231
    /**
232
     * Set the totals property
233
     *
234
     * @param ComparisonTotals $totals
235
     * @return $this
236
     */
237 1
    public function setTotals($totals)
238
    {
239 1
        $this->totals = $totals;
240 1
        return $this;
241
    }
242
}
243