Code Duplication    Length = 15-15 lines in 2 locations

module/Admin/src/Admin/Model/ClientsTable.php 1 location

@@ 50-64 (lines=15) @@
47
        return $this->fetchAll('application');
48
    }
49
50
    public function fetchUser( $id )
51
    {
52
        if (!$id) { return array(); 
53
        }
54
        $resultSet = $this->tableGateway->select(
55
            function (Select $select) use ($id) {
56
                if (!empty($id)) {
57
                    $select->where(array( '(scope = \'user\') AND (ref_id = \''.((int)$id).'\')' ))->order('type, name ASC');
58
                } else {
59
                    $select->order('type, name ASC');
60
                }
61
            }
62
        );
63
        return $resultSet;
64
    }
65
66
    public function getClients($id)
67
    {

module/Admin/src/Admin/Model/SettingsTable.php 1 location

@@ 50-64 (lines=15) @@
47
        return $this->fetchAll('application');
48
    }
49
50
    public function fetchUser( $id )
51
    {
52
        if (!$id) { return array(); 
53
        }
54
        $resultSet = $this->tableGateway->select(
55
            function (Select $select) use ($id) {
56
                if (!empty($id)) {
57
                    $select->where(array( '(scope = \'user\') AND (ref_id = \''.((int)$id).'\')' ))->order('type, name ASC');
58
                } else {
59
                    $select->order('type, name ASC');
60
                }
61
            }
62
        );
63
        return $resultSet;
64
    }
65
66
    public function getSettings($id)
67
    {