FilterHelper   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 18
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getEmptyFilter() 0 4 1
A getFilterFillByParamArray() 0 10 2
1
<?php
2
/**
3
 * This file is part of the Betfair library.
4
 *
5
 * (c) Daniele D'Angeli <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace Betfair\Helper;
11
12
class FilterHelper
13
{
14
    public static function getEmptyFilter()
15
    {
16
        return '{"filter":{}}';
17
    }
18
19
    public static function getFilterFillByParamArray($paramArray)
20
    {
21
        $json_array = array();
22
23
        foreach ($paramArray as $key => $value) {
24
            $json_array['filter'][$key] = $value;
25
        }
26
27
        return json_encode($json_array);
28
    }
29
}
30