Passed
Push — master ( 7b08a2...d0c126 )
by Supun
03:14
created

Mysql   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
namespace Lifeeka\JSQL\Helpers;
4
5
/**
6
 * Class Mysql.
7
 */
8
class Mysql
9
{
10
    public $mysql_text;
11
    public $mysql_array;
12
13
    /**
14
     * Json constructor.
15
     *
16
     * @param string $mysql
17
     */
18
    public function __construct(String $mysql)
19
    {
20
        $this->mysql_text = $mysql;
21
    }
22
23
    /**
24
     * @return mixed
25
     */
26
    public function toArray()
27
    {
28
        return json_decode($this->mysql_array);
29
    }
30
}
31