Passed
Push — master ( 2d01cb...b93be2 )
by Mike
02:37
created

JSON::json()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 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 getJson(){
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
}