Passed
Push — master ( 945dc8...ec757f )
by Mike
02:50
created

JSON   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 1 Features 0
Metric Value
wmc 2
c 3
b 1
f 0
lcom 1
cbo 1
dl 0
loc 17
ccs 4
cts 4
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A json() 0 3 1
A getBody() 0 3 1
1
<?php
2
/**
3
 * ©[2016] SugarCRM Inc.  Licensed by SugarCRM under the Apache 2.0 license.
4
 */
5
6
namespace SugarAPI\SDK\Response;
7
8
use SugarAPI\SDK\Response\Abstracts\AbstractResponse;
9
10
class JSON extends AbstractResponse {
11
12
    /**
13
     * Get JSON Response
14
     */
15 1
    public function json(){
0 ignored issues
show
Coding Style Best Practice introduced by
Please use __construct() instead of a PHP4-style constructor that is named after the class.
Loading history...
16 1
        return $this->body;
17
    }
18
19
    /**
20
     * @inheritdoc
21
     */
22 1
    public function getBody($asArray = true){
23 1
        return json_decode($this->body, $asArray);
24
    }
25
26
}