Passed
Branch master (e17e02)
by Jacques
02:12
created

SellStock   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 6
c 1
b 0
f 0
dl 0
loc 23
ccs 0
cts 4
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A loadOfx() 0 6 1
1
<?php
2
3
namespace OfxParser\Entities\Investment\Transaction;
4
5
use SimpleXMLElement;
6
use OfxParser\Entities\Investment\Transaction\Traits\SellType;
7
8
/**
9
 * OFX 203 doc:
10
 * 13.9.2.4.3 Investment Buy/Sell Aggregates <INVBUY>/<INVSELL>
11
 *
12
 * Properties found in the <INVSELL> aggregate,
13
 * plus <SELLTYPE> property.
14
 */
15
class SellStock extends SellSecurity
16
{
17
    /**
18
     * Traits used to define properties
19
     */
20
    use SellType;
0 ignored issues
show
Bug introduced by
The trait OfxParser\Entities\Inves...saction\Traits\SellType requires the property $SELLTYPE which is not provided by OfxParser\Entities\Inves...t\Transaction\SellStock.
Loading history...
21
22
    /**
23
     * @var string
24
     */
25
    public $nodeName = 'SELLSTOCK';
26
27
    /**
28
     * Imports the OFX data for this node.
29
     * @param SimpleXMLElement $node
30
     * @return $this
31
     */
32
    public function loadOfx(SimpleXMLElement $node)
33
    {
34
        parent::loadOfx($node);
35
        $this->loadSellType($node);
36
37
        return $this;
38
    }
39
}
40
41