It seems like $this->client->request('get', '/permissions') can also be of type Psr\Http\Message\StreamInterface and object; however, parameter $permissions of AcquiaCloudApi\Response\...Response::__construct() does only seem to accept array, 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
35
return new PermissionsResponse(/** @scrutinizer ignore-type */ $this->client->request('get', '/permissions'));