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

StickerSet::getStickers()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
c 2
b 0
f 0
cc 2
eloc 3
nc 2
nop 0
crap 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