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

ArrayOfBotCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 12
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A fromResponse() 0 9 2
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