Json   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A translate() 0 4 1
1
<?php
2
3
/**
4
 * Manage Response by Json 
5
 *
6
 * @category  	lib
7
 * @package		lib\Cache
8
 * @author    	Judicaël Paquet <[email protected]>
9
 * @copyright 	Copyright (c) 2013-2014 PAQUET Judicaël FR Inc. (https://github.com/las93)
10
 * @license   	https://github.com/las93/venus2/blob/master/LICENSE.md Tout droit réservé à PAQUET Judicaël
11
 * @version   	Release: 1.0.0
12
 * @filesource	https://github.com/las93/venus2
13
 * @link      	https://github.com/las93
14
 * @since     	1.0
15
 */
16
namespace Venus\lib\Response;
17
18
use \Venus\lib\Object as Object;
19
use \Venus\lib\Response\ResponseInterface as ResponseInterface;
20
21
/**
22
 * Manage Response by Json
23
 *
24
 * @category  	lib
25
 * @package		lib\Cache
26
 * @author    	Judicaël Paquet <[email protected]>
27
 * @copyright 	Copyright (c) 2013-2014 PAQUET Judicaël FR Inc. (https://github.com/las93)
28
 * @license   	https://github.com/las93/venus2/blob/master/LICENSE.md Tout droit réservé à PAQUET Judicaël
29
 * @version   	Release: 1.0.0
30
 * @filesource	https://github.com/las93/venus2
31
 * @link      	https://github.com/las93
32
 * @since     	1.0
33
 */
34
class Json implements ResponseInterface
35
{
36
    /**
37
     * translate the content
38
     * @see \Venus\lib\Response\ResponseInterface::translate()
39
     *
40
     * @access public
41
     * @param  mixed $mContent content to translate
42
     * @return mixed
43
     */
44
    public static function translate($mContent)
45
    {
46
        return json_encode(ObjectOperation::objectToArray($mContent));
47
    }
48
49
}
50