Completed
Push — master ( 0765b1...3d50cd )
by Seth
03:43 queued 01:43
created

LibAppsPest::http_build_query()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
namespace smtech\StMarksSearch\LibApps;
4
5
use Battis\Educoder\PestJSON;
6
7
class LibAppsPest extends PestJSON
8
{
9
    private $site_id;
10
    private $key;
11
12
    public function __construct($site_id, $key)
13
    {
14
        parent::__construct("https://lgapi-us.libapps.com/1.1");
15
        $this->site_id = $site_id;
16
        $this->key = $key;
17
    }
18
19
    /**
20
     * Allow overriding of `http_build_query()` for idiosyncratic APIs
21
     * @param mixed $data
22
     * @return string
23
     **/
24
    protected function http_build_query($data)
25
    {
26
        $data['site_id'] = $this->site_id;
27
        $data['key'] = $this->key;
28
        return http_build_query($data);
29
    }
30
}
31