Completed
Pull Request — master (#34)
by Adam
03:24
created

SslCertificatesResponse::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
namespace AcquiaCloudApi\Response;
4
5
/**
6
 * Class CertificatesResponse
7
 * @package AcquiaCloudApi\Response
8
 */
9
class SslCertificatesResponse extends \ArrayObject
10
{
11
12
    /**
13
     * CertificatesResponse constructor.
14
     * @param array $certificates
15
     */
16
    public function __construct($certificates)
17
    {
18
        parent::__construct(array_map(function ($certificate) {
19
            return new SslCertificateResponse($certificate);
20
        }, $certificates), self::ARRAY_AS_PROPS);
21
    }
22
}
23