Passed
Push — main ( c5d93b...c2e6dd )
by Alejandro
08:35 queued 06:32
created

FlowButton::subType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
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 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
namespace NotificationChannels\WhatsApp\Component;
4
5
class FlowButton extends Button
6
{
7 2
    public function __construct(?string $token, array $data)
8
    {
9 2
        $this->parameters[] = [
10 2
            'type' => 'action',
11 2
            'action' => [
12 2
                'flow_token' => $token,
13 2
                'flow_action_data' => $data,
14 2
            ],
15 2
        ];
16
    }
17
18 1
    public function subType(): string
19
    {
20 1
        return 'flow';
21
    }
22
}
23