Failed Conditions
Push — master ( eac8ff...e4a057 )
by Zbigniew
04:46
created

ActionsBlock::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
/** @noinspection UnusedConstructorDependenciesInspection */
4
5
declare(strict_types=1);
6
7
/*
8
 * This file is part of the zibios/sharep.
9
 *
10
 * (c) Zbigniew Ślązak
11
 */
12
13
namespace App\Slack\MessageBuilder\Block;
14
15
use App\Slack\MessageBuilder\Element\ActionsBlockElementInterface;
16
use App\Slack\MessageBuilder\Enum\MessageTypeEnum;
17
use App\Slack\MessageBuilder\MessageJsonSerializeTrait;
18
19
class ActionsBlock implements BlockInterface
20
{
21
    use MessageJsonSerializeTrait;
22
23
    /** @var string */
24
    private $type;
25
    /** @var array|ActionsBlockElementInterface[] */
26
    private $elements;
27
28 1
    public function __construct(ActionsBlockElementInterface ...$elements)
29
    {
30 1
        $this->type = MessageTypeEnum::BLOCK_ACTIONS;
31 1
        $this->elements = $elements;
32 1
    }
33
}
34