Passed
Pull Request — master (#156)
by Adam
07:31 queued 05:24
created

SshKeysResponse   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 16
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 TValue
7
 * @template-extends \ArrayObject<int,TValue>
8
 */
9
class SshKeysResponse extends \ArrayObject
10
{
11
12
    /**
13
     * @param array<object> $sshkeys
14
     */
15
    public function __construct($sshkeys)
16
    {
17
        parent::__construct(
18
            array_map(
19
                function ($sshkey) {
20
                    return new SshKeyResponse($sshkey);
21
                },
22
                $sshkeys
23
            ),
24
            self::ARRAY_AS_PROPS
25
        );
26
    }
27
}
28