TweetsRequest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getSorting() 0 3 1
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