Header   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A configureOptions() 0 17 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\IntDoc;
13
14
use Riesenia\Pohoda\Common\OptionsResolver;
15
use Riesenia\Pohoda\Document\AbstractHeader;
16
17
class Header extends AbstractHeader
18
{
19
    /** @var string[] */
20
    protected array $refElements = ['number', 'accounting', 'classificationVAT', 'classificationKVDPH', 'centre', 'activity', 'contract', 'regVATinEU', 'MOSS', 'evidentiaryResourcesMOSS'];
21
22
    /** @var string[] */
23
    protected array $elements = ['number', 'symVar', 'symPar', 'originalDocumentNumber', 'originalCorrectiveDocument', 'date', 'dateTax', 'dateAccounting', 'dateDelivery', 'dateKVDPH', 'dateKHDPH', 'accounting', 'classificationVAT', 'classificationKVDPH', 'numberKHDPH', 'text', 'partnerIdentity', 'myIdentity', 'liquidation', 'centre', 'activity', 'contract', 'regVATinEU', 'MOSS', 'evidentiaryResourcesMOSS', 'accountingPeriodMOSS', 'note', 'intNote', 'markRecord'];
24
25
    /**
26
     * {@inheritdoc}
27
     */
28 1
    protected function configureOptions(OptionsResolver $resolver): void
29
    {
30 1
        parent::configureOptions($resolver);
31
32
        // validate / format options
33 1
        $resolver->setNormalizer('symVar', $this->normalizerFactory->getClosure('string20'));
34 1
        $resolver->setNormalizer('symPar', $this->normalizerFactory->getClosure('string20'));
35 1
        $resolver->setNormalizer('date', $this->normalizerFactory->getClosure('date'));
36 1
        $resolver->setNormalizer('dateTax', $this->normalizerFactory->getClosure('date'));
37 1
        $resolver->setNormalizer('dateAccounting', $this->normalizerFactory->getClosure('date'));
38 1
        $resolver->setNormalizer('dateDelivery', $this->normalizerFactory->getClosure('date'));
39 1
        $resolver->setNormalizer('dateKVDPH', $this->normalizerFactory->getClosure('date'));
40 1
        $resolver->setNormalizer('dateKHDPH', $this->normalizerFactory->getClosure('date'));
41 1
        $resolver->setNormalizer('numberKHDPH', $this->normalizerFactory->getClosure('string32'));
42 1
        $resolver->setNormalizer('text', $this->normalizerFactory->getClosure('string240'));
43 1
        $resolver->setNormalizer('liquidation', $this->normalizerFactory->getClosure('bool'));
44 1
        $resolver->setNormalizer('markRecord', $this->normalizerFactory->getClosure('bool'));
45
    }
46
}
47