CronsResponse::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 1
Metric Value
cc 1
eloc 6
c 2
b 1
f 1
nc 1
nop 1
dl 0
loc 10
rs 10
1
<?php
2
3
namespace AcquiaCloudApi\Response;
4
5
/**
6
 * @template-extends \ArrayObject<int, \AcquiaCloudApi\Response\CronResponse>
7
 */
8
class CronsResponse extends \ArrayObject
9
{
10
    /**
11
     * @param array<object> $crons
12
     */
13
    public function __construct(array $crons)
14
    {
15
        parent::__construct(
16
            array_map(
17
                static function ($cron) {
18
                    return new CronResponse($cron);
19
                },
20
                $crons
21
            ),
22
            self::ARRAY_AS_PROPS
23
        );
24
    }
25
}
26