GetJson   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 14
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
1
<?php
2
namespace CodeCloud\Bundle\ShopifyBundle\Api\Request;
3
4
use GuzzleHttp\Psr7\Request;
5
6
class GetJson extends Request
7
{
8
    /**
9
     * @param string $url
10
     * @param array $params
11
     */
12
    public function __construct($url, array $params = array())
13
    {
14
        if (!empty($params)) {
15
            $url .= '?'.http_build_query($params);
16
        }
17
18
        parent::__construct('GET', $url, [
19
            'Content-type' => 'application/json',
20
        ]);
21
    }
22
}
23