Passed
Push — master ( 1fc8aa...45e169 )
by Anton
02:50
created

WebHook   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 8
c 1
b 0
f 0
dl 0
loc 33
ccs 5
cts 5
cp 1
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 1
    public function __construct(array $param = [])
41
    {
42 1
        parent::__construct($param);
43 1
        $this->rules = [
44 1
            'type' => 'required|alpha_dash',
45 1
            'url' => 'required|url',
46 1
        ];
47
    }
48
}
49