Price::configureOptions()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 1
crap 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\Stock;
13
14
use Riesenia\Pohoda\AbstractAgenda;
15
use Riesenia\Pohoda\Common\OptionsResolver;
16
17
class Price extends AbstractAgenda
18
{
19
    /**
20
     * {@inheritdoc}
21
     */
22 2
    public function getXML(): \SimpleXMLElement
23
    {
24 2
        $xml = $this->createXML()->addChild('stk:stockPriceItem', '', $this->namespace('stk'));
25
26 2
        return $this->addRefElement($xml, 'stk:stockPrice', $this->data);
27
    }
28
29
    /**
30
     * {@inheritdoc}
31
     */
32 1
    protected function configureOptions(OptionsResolver $resolver): void
33
    {
34
        // available options
35 1
        $resolver->setDefined(['ids', 'price']);
36
    }
37
}
38