Summary   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 9
c 0
b 0
f 0
dl 0
loc 20
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A configureOptions() 0 7 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\Invoice;
13
14
use Riesenia\Pohoda\Common\OptionsResolver;
15
use Riesenia\Pohoda\Document\AbstractSummary;
16
17
class Summary extends AbstractSummary
18
{
19
    /** @var string[] */
20
    protected array $elements = [
21
        'roundingDocument',
22
        'roundingVAT',
23
        'homeCurrency',
24
        'foreignCurrency',
25
    ];
26
27
    /**
28
     * {@inheritdoc}
29
     */
30 1
    protected function configureOptions(OptionsResolver $resolver): void
31
    {
32 1
        parent::configureOptions($resolver);
33
34
        // validate / format options
35 1
        $resolver->setAllowedValues('roundingDocument', ['none', 'math2one', 'math2half', 'math2tenth', 'math5cent', 'up2one', 'up2half', 'up2tenth', 'down2one', 'down2half', 'down2tenth']);
36 1
        $resolver->setAllowedValues('roundingVAT', ['none', 'noneEveryRate', 'up2tenthEveryItem', 'up2tenthEveryRate', 'math2tenthEveryItem', 'math2tenthEveryRate', 'math2halfEveryItem', 'math2halfEveryRate', 'math2intEveryItem', 'math2intEveryRate']);
37
    }
38
}
39