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

NotificationsResponse   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 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
     * MembersResponse constructor.
13
     * @param array $notifications
14
     */
15
    public function __construct($notifications)
16
    {
17
        parent::__construct(array_map(function ($notification) {
18
            return new NotificationResponse($notification);
19
        }, $notifications), self::ARRAY_AS_PROPS);
20
    }
21
}
22