Code Duplication    Length = 8-8 lines in 2 locations

class.ODataParams.php 1 location

@@ 15-22 (lines=8) @@
12
13
    function __construct($params)
14
    {
15
        if(isset($params['filter']))
16
        {
17
            $this->filter = new \Data\Filter($params['filter']);
18
        }
19
        else if(isset($params['$filter']))
20
        {
21
            $this->filter = new \Data\Filter($params['$filter']);
22
        }
23
24
        if(isset($params['$expand']))
25
        {

Data/class.SQLDataSet.php 1 location

@@ 10-17 (lines=8) @@
7
8
    function __construct($params)
9
    {
10
        if(isset($params['user']))
11
        {
12
            $this->pdo = new \PDO($params['dsn'], $params['user'], $params['pass']);
13
        }
14
        else
15
        {
16
            $this->pdo = new \PDO($params['dsn']);
17
        }
18
    }
19
20
    function _get_row_count_for_query($sql)