Passed
Pull Request — master (#1)
by João Felipe Magro
01:22
created

CallbackService   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
dl 0
loc 11
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getResponse() 0 9 1
1
<?php
2
3
namespace Ipag\Classes\Services;
4
5
final class CallbackService
6
{
7
    public function getResponse($message)
8
    {
9
        $xmlService = new XmlService();
10
11
        $simpleXmlObject = $xmlService->validate($message);
12
13
        $response = $xmlService->xmlToStdClass($simpleXmlObject);
14
15
        return (new TransactionResponseService())->populate($response);
16
    }
17
}
18