Passed
Push — master ( 1e777f...642b23 )
by Dane
01:54
created

DatabaseNamesResponse   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

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

1 Method

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