Passed
Pull Request — 1.x (#53)
by Pavel
02:12
created

EnvelopeTemplateNotificationsEndpoint   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 7
c 1
b 0
f 0
dl 0
loc 15
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace DigitalCz\DigiSign\Endpoint;
6
7
use DigitalCz\DigiSign\Endpoint\Traits\CRUDEndpointTrait;
8
use DigitalCz\DigiSign\Resource\EnvelopeTemplate;
9
use DigitalCz\DigiSign\Resource\EnvelopeTemplateNotification;
10
11
/**
12
 * @extends ResourceEndpoint<EnvelopeTemplateNotification>
13
 * @method EnvelopeTemplateNotification get(string $id)
14
 * @method EnvelopeTemplateNotification create(array $body)
15
 * @method EnvelopeTemplateNotification update(string $id, array $body)
16
 */
17
final class EnvelopeTemplateNotificationsEndpoint extends ResourceEndpoint
18
{
19
    /** @use CRUDEndpointTrait<EnvelopeTemplateNotification> */
20
    use CRUDEndpointTrait;
21
22
    /**
23
     * @param EnvelopeTemplate|string $template
24
     */
25
    public function __construct(EnvelopeTemplatesEndpoint $parent, $template)
26
    {
27
        parent::__construct(
28
            $parent,
29
            '/{template}/notifications',
30
            EnvelopeTemplateNotification::class,
31
            ['template' => $template]
32
        );
33
    }
34
}
35