Param   A
last analyzed

Complexity

Total Complexity 27

Size/Duplication

Total Lines 329
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 27
lcom 1
cbo 1
dl 0
loc 329
rs 10
c 0
b 0
f 0

27 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 4 1
A setMarketFilter() 0 5 1
A setMarketProjection() 0 5 1
A addMarketProjection() 0 5 1
A setFilter() 0 5 1
A setMaxResults() 0 5 1
A setCurrencyCode() 0 5 1
A setLocale() 0 5 1
A setMarketIds() 0 5 1
A setMatchProjection() 0 5 1
A setOrderProjection() 0 5 1
A setMarketSort() 0 5 1
A setPriceProjection() 0 5 1
A setEventTypeIds() 0 5 1
A setEventIds() 0 5 1
A setRunnerIds() 0 5 1
A setBetIds() 0 5 1
A setSide() 0 5 1
A setSettledDateRange() 0 5 1
A setGroupBy() 0 5 1
A setIncludeItemDescription() 0 5 1
A setFromRecord() 0 5 1
A setRecordCount() 0 5 1
A setDateRange() 0 5 1
A setOrderBy() 0 5 1
A setSortDir() 0 5 1
A setBetStatus() 0 5 1
1
<?php
2
/**
3
 * This file is part of the Betfair library.
4
 *
5
 * (c) Daniele D'Angeli <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace Betfair\Model;
11
12
class Param extends BetfairSerializable implements ParamInterface
13
{
14
    /** @var  array */
15
    protected $marketIds;
16
17
    /** @var  PriceProjection */
18
    protected $priceProjection;
19
20
    /** @var  OrderProjection */
21
    protected $orderProjection;
22
23
    /** @var  MatchProjection */
24
    protected $matchProjection;
25
26
    /** @var  MarketFilterInterface */
27
    protected $filter;
28
29
    /** @var  int */
30
    protected $maxResults;
31
32
    /** @var  array */
33
    protected $marketProjection;
34
35
    /** @var  string */
36
    protected $locale;
37
38
    /** @var  string */
39
    protected $currencyCode;
40
41
    /** @var  MarketSort */
42
    protected $marketSort;
43
44
    /** @var  $eventTypeIds */
45
    protected $eventTypeIds;
46
47
    /** @var  array $runnerIds */
48
    protected $runnerIds;
49
50
    /** @var  array $eventIds */
51
    protected $eventIds;
52
53
    /** @var  array $betIds */
54
    protected $betIds;
55
56
    /** @var  string $side */
57
    protected $side;
58
59
    /** @var  TimeRange $settledDateRange */
60
    protected $settledDateRange;
61
62
    /** @var  string $groupBy */
63
    protected $groupBy;
64
65
    /** @var  bool $includeItemDescription */
66
    protected $includeItemDescription;
67
68
    /** @var  int $fromRecord */
69
    protected $fromRecord;
70
71
    /** @var  int $recordCount */
72
    protected $recordCount;
73
74
    /** @var  TimeRange $timeRange */
75
    protected $timeRange;
76
77
    /** @var  TimeRange $dateRange */
78
    protected $dateRange;
79
80
    /** @var  $orderBy */
81
    protected $orderBy;
82
83
    /** @var  $sortDir */
84
    protected $sortDir;
85
86
    protected $betStatus;
87
88
    public static function create()
89
    {
90
        return new Param();
91
    }
92
93
    public function setMarketFilter(MarketFilterInterface $filter = null)
94
    {
95
        $this->filter = $filter;
96
        return $this;
97
    }
98
99
    /**
100
     * @param MarketProjection $marketProjection
101
     * @return $this
102
     */
103
    public function setMarketProjection(MarketProjection $marketProjection)
104
    {
105
        $this->marketProjection = $marketProjection;
0 ignored issues
show
Documentation Bug introduced by
It seems like $marketProjection of type object<Betfair\Model\MarketProjection> is incompatible with the declared type array of property $marketProjection.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
106
        return $this;
107
    }
108
109
    public function addMarketProjection($marketProjection)
110
    {
111
        $this->marketProjection[] = $marketProjection;
112
        return $this;
113
    }
114
115
    /**
116
     * @param MarketFilterInterface $filter
117
     * @return $this
118
     */
119
    public function setFilter(MarketFilterInterface $filter = null)
120
    {
121
        $this->filter = $filter;
122
        return $this;
123
    }
124
125
    /**
126
     * @param $maxResults
127
     * @return $this
128
     */
129
    public function setMaxResults($maxResults)
130
    {
131
        $this->maxResults = $maxResults;
132
        return $this;
133
    }
134
135
    /**
136
     * @param string $currencyCode
137
     * @return $this
138
     */
139
    public function setCurrencyCode($currencyCode)
140
    {
141
        $this->currencyCode = $currencyCode;
142
        return $this;
143
    }
144
145
    /**
146
     * @param string $locale
147
     * @return $this
148
     */
149
    public function setLocale($locale)
150
    {
151
        $this->locale = $locale;
152
        return $this;
153
    }
154
155
    /**
156
     * @param array $marketIds
157
     * @return $this
158
     */
159
    public function setMarketIds(array $marketIds)
160
    {
161
        $this->marketIds = $marketIds;
162
        return $this;
163
    }
164
165
    /**
166
     * @param MatchProjection $matchProjection
167
     * @return $this
168
     */
169
    public function setMatchProjection(array $matchProjection)
170
    {
171
        $this->matchProjection = $matchProjection;
0 ignored issues
show
Documentation Bug introduced by
It seems like $matchProjection of type array is incompatible with the declared type object<Betfair\Model\MatchProjection> of property $matchProjection.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
172
        return $this;
173
    }
174
175
    /**
176
     * @param \Betfair\Model\OrderProjection $orderProjection
177
     * @return $this
178
     */
179
    public function setOrderProjection($orderProjection)
180
    {
181
        $this->orderProjection = $orderProjection;
182
        return $this;
183
    }
184
185
    /**
186
     * @param \Betfair\Model\MarketSort $marketSort
187
     * @return $this
188
     */
189
    public function setMarketSort($marketSort)
190
    {
191
        $this->marketSort = $marketSort;
192
        return $this;
193
    }
194
195
    /**
196
     * @param PriceProjection $priceProjection
197
     * @return $this
198
     */
199
    public function setPriceProjection(PriceProjection $priceProjection)
200
    {
201
        $this->priceProjection = $priceProjection;
202
        return $this;
203
    }
204
205
    /**
206
     * @param $eventTypeIds
207
     * @return $this
208
     */
209
    public function setEventTypeIds(array $eventTypeIds)
210
    {
211
        $this->eventTypeIds = $eventTypeIds;
212
        return $this;
213
    }
214
215
    /**
216
     * @param $eventIds
217
     * @return $this
218
     */
219
    public function setEventIds(array $eventIds)
220
    {
221
        $this->eventIds = $eventIds;
222
        return $this;
223
    }
224
225
    /**
226
     * @param $runnerIds
227
     * @return $this
228
     */
229
    public function setRunnerIds(array $runnerIds)
230
    {
231
        $this->runnerIds = $runnerIds;
232
        return $this;
233
    }
234
235
    /**
236
     * @param $betIds
237
     * @return $this
238
     */
239
    public function setBetIds(array $betIds)
240
    {
241
        $this->betIds = $betIds;
242
        return $this;
243
    }
244
245
    /**
246
     * @param $side
247
     * @return $this
248
     */
249
    public function setSide($side)
250
    {
251
        $this->side = $side;
252
        return $this;
253
    }
254
255
    /**
256
     * @param $settledDateRange
257
     * @return $this
258
     */
259
    public function setSettledDateRange(TimeRange $settledDateRange)
260
    {
261
        $this->settledDateRange = $settledDateRange;
262
        return $this;
263
    }
264
265
    /**
266
     * @param string $groupBy
267
     * @return $this
268
     */
269
    public function setGroupBy($groupBy)
270
    {
271
        $this->groupBy = $groupBy;
272
        return $this;
273
    }
274
275
    /**
276
     * @param bool $includeItemDescription
277
     * @return $this
278
     */
279
    public function setIncludeItemDescription($includeItemDescription)
280
    {
281
        $this->includeItemDescription = $includeItemDescription;
282
        return $this;
283
    }
284
285
    /**
286
     * @param int $fromRecord
287
     * @return $this
288
     */
289
    public function setFromRecord($fromRecord)
290
    {
291
        $this->fromRecord = $fromRecord;
292
        return $this;
293
    }
294
295
    /**
296
     * @param $recordCount
297
     * @return $this
298
     */
299
    public function setRecordCount($recordCount)
300
    {
301
        $this->recordCount = $recordCount;
302
        return $this;
303
    }
304
305
    /**
306
     * @param TimeRange $dateRange
307
     * @return $this
308
     */
309
    public function setDateRange(TimeRange $dateRange)
310
    {
311
        $this->dateRange = $dateRange;
312
        return $this;
313
    }
314
315
    /**
316
     * @param $orderBy
317
     * @return $this
318
     */
319
    public function setOrderBy($orderBy)
320
    {
321
        $this->orderBy = $orderBy;
322
        return $this;
323
    }
324
325
    /**
326
     * @param $sortDir
327
     * @return $this
328
     */
329
    public function setSortDir($sortDir)
330
    {
331
        $this->sortDir = $sortDir;
332
        return $this;
333
    }
334
335
    public function setBetStatus($betStatus)
336
    {
337
        $this->betStatus = $betStatus;
338
        return $this;
339
    }
340
}
341