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

Mysql::toArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
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