ArrayOfUpdates::fromResponse()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 4
c 1
b 0
f 1
dl 0
loc 8
ccs 3
cts 3
cp 1
rs 10
cc 2
nc 2
nop 1
crap 2
1
<?php
2
3
namespace TelegramBot\Api\Types;
4
5
abstract class ArrayOfUpdates
6
{
7 3
    /**
8
     * @param array $data
9 3
     * @return Update[]
10 3
     */
11 3
    public static function fromResponse($data)
12 3
    {
13
        $arrayOfUpdates = [];
14 3
        foreach ($data as $update) {
15
            $arrayOfUpdates[] = Update::fromResponse($update);
16
        }
17
18
        return $arrayOfUpdates;
19
    }
20
}
21