It seems like $ch can also be of type false; however, parameter $ch of curl_setopt() does only seem to accept resource, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
It seems like $ch can also be of type false; however, parameter $ch of curl_exec() does only seem to accept resource, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
It seems like $ch can also be of type false; however, parameter $ch of curl_getinfo() does only seem to accept resource, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
It seems like $ch can also be of type false; however, parameter $ch of curl_close() does only seem to accept resource, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
51
curl_close(/** @scrutinizer ignore-type */ $ch);
Loading history...
52
53
if (!$this->codeResponse($httpcode)) {
54
return null;
55
}
56
57
return $this->setResponse($result);
58
}
59
60
/**
61
* @param $result
62
* @return mixed
63
*/
64
private function setResponse($result)
65
{
66
if ($this->format == Quotation::RESPONSE_XML) {
67
return $result;
68
}
69
70
return json_decode($result);
71
}
72
73
/**
74
* @param $httpcode
75
* @return bool
76
*/
77
private function codeResponse($httpcode): bool
78
{
79
if ($httpcode != 200) {
80
return false;
81
}
82
83
return true;
84
}
85
86
/**
87
* @param string $formatResponse
88
* @return string
89
*/
90
private function setFormat(string $formatResponse): string