Passed
Pull Request — master (#34)
by Adam
03:16
created

SslCertificatesResponse   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
c 0
b 0
f 0
dl 0
loc 12
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
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