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

SellType::loadSellType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 5
ccs 0
cts 3
cp 0
rs 10
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
namespace OfxParser\Entities\Investment\Transaction\Traits;
4
5
use SimpleXMLElement;
6
7
trait SellType
8
{
9
    /**
10
     * Type of sell. SELL, SELLSHORT
11
     * @var string
12
     */
13
    public $sellType;
14
15
    /**
16
     * @param SimpleXMLElement $node
17
     * @return $this for chaining
18
     */
19
    protected function loadSellType(SimpleXMLElement $node)
20
    {
21
        $this->sellType = (string) $node->SELLTYPE;
22
23
        return $this;
24
    }
25
}
26