This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
25
{
26
$finalUrl = static::manipulateUrl($url, $params);
27
28
$client = new Client();
29
return new JCResponse($client->request('GET', $finalUrl, [
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
35
{
36
$client = new Client();
37
return new JCResponse($client->request('POST', $url, [
38
'headers' => $headers,
39
'form_params' => $params
40
]));
41
}
42
43
public static function put($url, $headers, $params, $options)
44
{
45
// TODO: Implement put() method.
46
}
47
48
public static function head($url, $headers, $params, $options)
49
{
50
// TODO: Implement head() method.
51
}
52
53
public static function delete($url, $headers, $params, $options)
54
{
55
// TODO: Implement delete() method.
56
}
57
58
59
/**
60
* @param string $url
61
* @param array $params
62
* @return string
63
*/
64
protected static function manipulateUrl($url, $params = [])
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.