Completed
Push — develop ( 32ebf1...b1a895 )
by
unknown
15:09
created

Venue::__construct()   F

Complexity

Conditions 12
Paths 240

Size

Total Lines 31
Code Lines 18

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 156

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 31
ccs 0
cts 25
cp 0
rs 3.9752
cc 12
eloc 18
nc 240
nop 1
crap 156

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 Venue
15
 *
16
 * @link https://core.telegram.org/bots/api#venue
17
 *
18
 * @method Location getLocation()     Venue location
19
 * @method string   getTitle()        Name of the venue
20
 * @method string   getAddress()      Address of the venue
21
 * @method string   getFoursquareId() Optional. Foursquare identifier of the venue
22
 */
23
class Venue extends Entity
24
{
25
    /**
26
     * {@inheritdoc}
27
     */
28
    protected function subEntities()
29
    {
30
        return [
31
            'location' => Location::class,
32
        ];
33
    }
34
}
35