Passed
Pull Request — main (#9)
by
unknown
08:34
created

UrlButton   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 9
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 2
1
<?php
2
3
namespace NotificationChannels\WhatsApp\Component;
4
5
class UrlButton extends Button {
6
7
    public function __construct(array $url_suffixes)
8
    {
9
        $this->sub_type = 'url';
10
        foreach($url_suffixes as $url_suffix){
11
            $this->parameters[] = [
12
                'type' => 'text',
13
                'text' => $url_suffix
14
            ];
15
        }
16
    }
17
}
18