IncomeType::loadIncomeType()   A
last analyzed

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 IncomeType
8
{
9
    /**
10
     * Type of investment income:
11
     * CGLONG (capital gains-long term),
12
     * CGSHORT (capital gains-short term),
13
     * DIV (dividend),
14
     * INTEREST,
15
     * MISC
16
     * @var string
17
     */
18
    public $incomeType;
19
20
    /**
21
     * @param SimpleXMLElement $node
22
     * @return $this for chaining
23
     */
24
    protected function loadIncomeType(SimpleXMLElement $node)
25
    {
26
        $this->incomeType = (string) $node->INCOMETYPE;
27
28
        return $this;
29
    }
30
}
31