ArrayRpcAdapter   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A adaptResponse() 0 12 3
1
<?php
2
/**
3
 * This file is part of the Betfair library.
4
 *
5
 * (c) Daniele D'Angeli <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace Betfair\Adapter;
11
12
class ArrayRpcAdapter implements AdapterInterface
13
{
14
    public function adaptResponse($response)
15
    {
16
        $data = json_decode($response, true);
17
        
18
        if (isset($data['result'])){
19
        	return $data['result'];
20
        }
21
        
22
        if (isset($data['error'])){
23
        	return $data['error'];
24
        }
25
    }
26
}
27