Completed
Push — master ( e6cd79...15515b )
by Mike
02:12
created

JSON   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 18
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A json() 0 3 1
A getBody() 0 3 1
1
<?php
2
3
namespace SugarAPI\SDK\Response;
4
5
use SugarAPI\SDK\Response\Abstracts\AbstractResponse;
6
7
class JSON extends AbstractResponse {
8
9
10
    /**
11
     * Get JSON Response
12
     */
13
    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...
14
        return $this->body;
15
    }
16
17
    /**
18
     * @inheritdoc
19
     */
20
    public function getBody() {
21
        return json_decode($this->body);
22
    }
23
24
}