Completed
Push — master ( 203d4a...ef9e39 )
by
unknown
04:46 queued 02:35
created

Video::__construct()   D

Complexity

Conditions 14
Paths 190

Size

Total Lines 30
Code Lines 19

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 30
rs 4.7877
c 0
b 0
f 0
cc 14
eloc 19
nc 190
nop 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A Video::subEntities() 0 6 1

How to fix   Complexity   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

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 Video
15
 *
16
 * @link https://core.telegram.org/bots/api#video
17
 *
18
 * @method string    getFileId()   Unique identifier for this file
19
 * @method int       getWidth()    Video width as defined by sender
20
 * @method int       getHeight()   Video height as defined by sender
21
 * @method int       getDuration() Duration of the video in seconds as defined by sender
22
 * @method PhotoSize getThumb()    Optional. Video thumbnail
23
 * @method string    getMimeType() Optional. Mime type of a file as defined by sender
24
 * @method int       getFileSize() Optional. File size
25
 */
26
class Video extends Entity
27
{
28
    /**
29
     * {@inheritdoc}
30
     */
31
    protected function subEntities()
32
    {
33
        return [
34
            'thumb' => PhotoSize::class,
35
        ];
36
    }
37
}
38