Completed
Push — master ( 7d37a2...fea370 )
by Nikolay
06:21
created

GetUserProfilePhotosMethod   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Test Coverage

Coverage 75%

Importance

Changes 0
Metric Value
wmc 2
eloc 8
dl 0
loc 32
ccs 3
cts 4
cp 0.75
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Greenplugin\TelegramBot\Method;
6
7
use Greenplugin\TelegramBot\Method\Traits\FillFromArrayTrait;
8
use Greenplugin\TelegramBot\Method\Traits\UserIdVariableTrait;
9
10
/**
11
 * Class GetUserProfilePhotosMethod.
12
 *
13
 * @see https://core.telegram.org/bots/api#getuserprofilephotos
14
 */
15
class GetUserProfilePhotosMethod
16
{
17
    use FillFromArrayTrait;
18
    use UserIdVariableTrait;
19
20
    /**
21
     * Optional. Sequential number of the first photo to be returned. By default, all photos are returned.
22
     *
23
     * @var int|null
24
     */
25
    public $offset;
26
27
    /**
28
     * Limits the number of photos to be retrieved. Values between 1—100 are accepted. Defaults to 100.
29
     *
30
     * @var int|null
31
     */
32
    public $limit;
33
34
    /**
35
     * GetUserProfilePhotosMethod constructor.
36
     *
37
     * @param int        $userId
38
     * @param array|null $data
39
     *
40
     * @throws \Greenplugin\TelegramBot\Exception\BadArgumentException
41
     */
42 3
    public function __construct(int $userId, array $data = null)
43
    {
44 3
        $this->userId = $userId;
45 3
        if ($data) {
46
            $this->fill($data);
47
        }
48 3
    }
49
}
50