TweetsRequest::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 3
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Osnova\Services\Tweets\Requests;
4
5
use Osnova\Services\ServiceRequest;
6
7
class TweetsRequest extends ServiceRequest
8
{
9
    /** @var string */
10
    protected $sorting;
11
12
    /**
13
     * TweetsRequest constructor.
14
     *
15
     * @param string $sorting
16
     * @param int    $count
17
     * @param int    $offset
18
     */
19
    public function __construct(string $sorting = 'fresh', int $count = 20, int $offset = 0)
20
    {
21
        parent::__construct($count, $offset);
22
23
        $this->sorting = $sorting;
24
    }
25
26
    /**
27
     * Get tweets sorting type.
28
     *
29
     * @return string
30
     */
31
    public function getSorting()
32
    {
33
        return $this->sorting;
34
    }
35
}
36