Passed
Pull Request — master (#408)
by Alexander
02:27
created

ArrayOfUpdates   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
eloc 5
c 1
b 0
f 1
dl 0
loc 10
ccs 6
cts 6
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A fromResponse() 0 8 2
1
<?php
2
3
namespace TelegramBot\Api\Types;
4
5
abstract class ArrayOfUpdates
6
{
7 3
    public static function fromResponse($data)
8
    {
9 3
        $arrayOfUpdates = [];
10 3
        foreach ($data as $update) {
11 3
            $arrayOfUpdates[] = Update::fromResponse($update);
12 3
        }
13
14 3
        return $arrayOfUpdates;
15
    }
16
}
17