It seems like $this->httpClient can also be of type null; however, parameter $httpClient of IBM\Watson\ToneAnalyzer\Api\Tone::__construct() does only seem to accept Http\Client\HttpClient, 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
46
return new Api\Tone(/** @scrutinizer ignore-type */ $this->httpClient, $this->hydrator, $this->requestBuilder);