ProfileResponse   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 26
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getMasterData() 0 3 1
A getInstallmentConfigurationResult() 0 3 1
A simpleXmlElementToArrayRecursive() 0 3 1
1
<?php
2
3
/**
4
 * MIT License
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Zed\Ratepay\Business\Api\Model\Response;
9
10
use SprykerEco\Zed\Ratepay\Business\Api\SimpleXMLElement;
11
12
class ProfileResponse extends BaseResponse
13
{
14
    /**
15
     * @return array
16
     */
17
    public function getMasterData()
18
    {
19
        return $this->simpleXmlElementToArrayRecursive($this->xmlObject->content->{'master-data'});
0 ignored issues
show
Bug Best Practice introduced by
The property content does not exist on SprykerEco\Zed\Ratepay\B...ss\Api\SimpleXMLElement. Since you implemented __get, consider adding a @property annotation.
Loading history...
20
    }
21
22
    /**
23
     * @return array
24
     */
25
    public function getInstallmentConfigurationResult()
26
    {
27
        return $this->simpleXmlElementToArrayRecursive($this->xmlObject->content->{'installment-configuration-result'});
0 ignored issues
show
Bug Best Practice introduced by
The property content does not exist on SprykerEco\Zed\Ratepay\B...ss\Api\SimpleXMLElement. Since you implemented __get, consider adding a @property annotation.
Loading history...
28
    }
29
30
    /**
31
     * @param \SprykerEco\Zed\Ratepay\Business\Api\SimpleXMLElement $xmlObject
32
     *
33
     * @return array
34
     */
35
    protected function simpleXmlElementToArrayRecursive(SimpleXMLElement $xmlObject)
36
    {
37
        return json_decode(json_encode((array)$xmlObject), true);
38
    }
39
}
40