Completed
Push — develop ( 7b5bf5...5676b7 )
by Avtandil
13s
created

StickerSet   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 17
ccs 3
cts 3
cp 1
rs 10
c 2
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getStickers() 0 6 2
1
<?php
2
/**
3
 * This file is part of the TelegramBot package.
4
 *
5
 * (c) Avtandil Kikabidze aka LONGMAN <[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
11
namespace Longman\TelegramBot\Entities;
12
13
/**
14
 * Class StickerSet
15
 *
16
 * @link https://core.telegram.org/bots/api#stickerset
17
 *
18
 * @method string getName()          Sticker set name
19
 * @method string getTitle()         Sticker set title
20
 * @method bool   getContainsMasks() True, if the sticker set contains masks
21
 */
22
class StickerSet extends Entity
23
{
24
    /**
25
     * List of all set stickers
26
     *
27
     * This method overrides the default getStickers method
28
     * and returns a nice array of Sticker objects.
29
     *
30
     * @return null|Sticker[]
31
     */
32 1
    public function getStickers()
33
    {
34 1
        $pretty_array = $this->makePrettyObjectArray(Sticker::class, 'stickers');
35
36 1
        return empty($pretty_array) ? null : $pretty_array;
37
    }
38
}
39