Passed
Pull Request — master (#28)
by Patrick
03:01
created

MessageCollectionDto::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 1
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of forecast.it.fill project.
7
 * (c) Patrick Jaja <[email protected]>
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace ForecastAutomation\QueueClient\Shared\Dto;
13
14
use ForecastAutomation\Kernel\Shared\Dto\AbstractDto;
15
16
// https://github.com/cloudevents/spec/blob/v1.0.1/json-format.md#32-examples
17
class MessageCollectionDto extends AbstractDto
18
{
19
    /**
20
     * @var \ForecastAutomation\QueueClient\Shared\Dto\MessageDto[]
21
     */
22
    public array $messageDtos;
23
24 1
    public function __construct(
25
        MessageDto ...$messageDtos,
26
    ) {
27 1
        $this->messageDtos = $messageDtos;
28 1
    }
29
}
30