IntDoc   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getImportRoot() 0 3 1
A getDocumentName() 0 3 1
A addTaxDocument() 0 10 1
A getDocumentNamespace() 0 3 1
A getDocumentElements() 0 3 1
1
<?php
2
3
/**
4
 * This file is part of riesenia/pohoda package.
5
 *
6
 * Licensed under the MIT License
7
 * (c) RIESENIA.com
8
 */
9
10
declare(strict_types=1);
11
12
namespace Riesenia\Pohoda;
13
14
/**
15
 * @property array{
16
 *     taxDocument?: Type\TaxDocument,
17
 * } $data
18
 */
19
class IntDoc extends AbstractDocument
20
{
21 6
    public function getImportRoot(): string
22
    {
23 6
        return 'lst:intDoc';
24
    }
25
26
    /**
27
     * Add tax document.
28
     *
29
     * @param array<string,mixed> $data
30
     *
31
     * @return $this
32
     */
33 1
    public function addTaxDocument(array $data): self
34
    {
35 1
        $taxDocument = new Type\TaxDocument($this->dependenciesFactory);
36 1
        $taxDocument
37 1
            ->setDirectionalVariable($this->useOneDirectionalVariables)
38 1
            ->setResolveOptions($this->resolveOptions)
39 1
            ->setData($data);
40 1
        $this->data['taxDocument'] = $taxDocument;
41
42 1
        return $this;
43
    }
44
45
    /**
46
     * {@inheritdoc}
47
     */
48 5
    protected function getDocumentElements(): array
49
    {
50 5
        return \array_merge(['taxDocument'], parent::getDocumentElements());
51
    }
52
53
    /**
54
     * {@inheritdoc}
55
     */
56 6
    protected function getDocumentNamespace(): string
57
    {
58 6
        return 'int';
59
    }
60
61
    /**
62
     * {@inheritdoc}
63
     */
64 6
    protected function getDocumentName(): string
65
    {
66 6
        return 'intDoc';
67
    }
68
}
69