Id   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
namespace Raigu\XRoad\SoapEnvelope;
4
5
use Raigu\XRoad\SoapEnvelope\Element\AbstractElement;
6
7
/**
8
 * I am a X-Road Message id.
9
 *
10
 * I can inject myself into SOAP envelope header
11
 */
12
final class Id extends AbstractElement
13
{
14
    /**
15
     * @param string $id Unique identifier of X-Road message.
16
     *             According to the specification recommended
17
     *             form of message id is UUID.
18
     * @see https://www.x-tee.ee/docs/live/xroad/pr-mess_x-road_message_protocol.html#22-message-headers
19
     */
20
    public function __construct(string $id)
21
    {
22
        parent::__construct(
23
            new SoapHeaderElement('id', $id)
24
        );
25
    }
26
}
27