BranchesResponse   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 2
Bugs 1 Features 1
Metric Value
wmc 1
eloc 7
c 2
b 1
f 1
dl 0
loc 15
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
1
<?php
2
3
namespace AcquiaCloudApi\Response;
4
5
use ArrayObject;
6
7
/**
8
 * @template-extends \ArrayObject<int, \AcquiaCloudApi\Response\BranchResponse>
9
 */
10
class BranchesResponse extends ArrayObject
11
{
12
    /**
13
     * @param array<object> $branches
14
     */
15
    public function __construct(array $branches)
16
    {
17
        parent::__construct(
18
            array_map(
19
                static function ($branch) {
20
                    return new BranchResponse($branch);
21
                },
22
                $branches
23
            ),
24
            self::ARRAY_AS_PROPS
25
        );
26
    }
27
}
28