Completed
Push — master ( aed86d...e8b4c8 )
by Adam
04:04
created

NotificationsResponse::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

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