SecId::loadSecId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 8
ccs 0
cts 4
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
/**
8
 * OFX 203 doc:
9
 * 13.8.1 Security Identification <SECID>
10
 */
11
trait SecId
12
{
13
    /**
14
     * Identifier for the security being traded.
15
     * @var string
16
     */
17
    public $securityId;
18
19
    /**
20
     * The type of identifier for the security being traded.
21
     * @var string
22
     */
23
    public $securityIdType;
24
25
    /**
26
     * @param SimpleXMLElement $node
27
     * @return $this for chaining
28
     */
29
    protected function loadSecId(SimpleXMLElement $node)
30
    {
31
        // <SECID>
32
        //  - REQUIRED: <UNIQUEID>, <UNIQUEIDTYPE>
33
        $this->securityId = (string) $node->UNIQUEID;
34
        $this->securityIdType = (string) $node->UNIQUEIDTYPE;
35
36
        return $this;
37
    }
38
}
39