WebHook   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 8
c 1
b 0
f 0
dl 0
loc 33
ccs 0
cts 5
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace CdekSDK2\BaseTypes;
6
7
use JMS\Serializer\Annotation\Type;
8
9
/**
10
 * Class WebHook
11
 * @package CdekSDK2\BaseTypes
12
 */
13
class WebHook extends Base
14
{
15
    /**
16
     * Идентификатор подписки
17
     * @Type("string")
18
     * @var string
19
     */
20
    public $uuid;
21
22
    /**
23
     * Тип события
24
     * @Type("string")
25
     * @var string
26
     */
27
    public $type;
28
29
    /**
30
     * URL клиента для получения вебхуков
31
     * @Type("string")
32
     * @var string
33
     */
34
    public $url;
35
36
    /**
37
     * WebHook constructor.
38
     * @param array $param
39
     */
40
    public function __construct(array $param = [])
41
    {
42
        parent::__construct($param);
43
        $this->rules = [
44
            'type' => 'required|alpha_dash',
45
            'url' => 'required|url',
46
        ];
47
    }
48
}
49