Passed
Pull Request — master (#314)
by Eldar
02:38
created

ArrayOfBotCommand::fromResponse()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
dl 0
loc 9
ccs 0
cts 8
cp 0
rs 9.9666
c 0
b 0
f 0
cc 2
nc 2
nop 1
crap 6
1
<?php
2
3
namespace TelegramBot\Api\Types;
4
5
abstract class ArrayOfBotCommand
6
{
7
    public static function fromResponse($data)
8
    {
9
        $arrayOfBotCommand = [];
10
        foreach ($data as $botCommand) {
11
            $arrayOfBotCommand[] = BotCommand::fromResponse($botCommand);
12
        }
13
14
        return $arrayOfBotCommand;
15
    }
16
}
17