GetTerminals::init()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
crap 1
1
<?php
2
namespace Loevgaard\AltaPay\Response;
3
4
use Loevgaard\AltaPay\Entity\ResultTrait;
5
use Loevgaard\AltaPay\Entity\TerminalsTrait;
6
7
class GetTerminals extends Response
8
{
9
    use TerminalsTrait;
10
    use ResultTrait;
11
12 3
    protected function init()
13
    {
14
        /** @var \SimpleXMLElement $body */
15 3
        $body = $this->xmlDoc->Body;
0 ignored issues
show
Bug introduced by
The property Body does not seem to exist in SimpleXMLElement.

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
16
17 3
        $this->hydrateResult($body);
18 3
        $this->hydrateTerminals($body);
19 3
    }
20
}
21