| 1 | <?php | ||
| 15 | abstract class AbstractClient | ||
| 16 | { | ||
| 17 | /** | ||
| 18 | * The HTTP client. | ||
| 19 | * | ||
| 20 | * @var \Http\Client\HttpClient | ||
| 21 | */ | ||
| 22 | private $httpClient; | ||
| 23 | |||
| 24 | /** | ||
| 25 | * The HTTP message factory. | ||
| 26 | * | ||
| 27 | * @var \Http\Message\MessageFactory|null | ||
| 28 | */ | ||
| 29 | private $messageFactory; | ||
| 30 | |||
| 31 | /** | ||
| 32 | * AbstractClient constructor. | ||
| 33 | * | ||
| 34 | * @param \Http\Client\HttpClient $client | ||
|  | |||
| 35 | * @param \Http\Message\MessageFactory|null $messageFactory | ||
| 36 | */ | ||
| 37 | public function __construct(HttpClient $client = null, MessageFactory $messageFactory = null) | ||
| 42 | |||
| 43 | /** | ||
| 44 | * @param \Http\Client\HttpClient $httpClient | ||
| 45 | * | ||
| 46 | * @return \drupol\Yaroc\Http\AbstractClient | ||
| 47 | */ | ||
| 48 | public function withHttpClient(HttpClient $httpClient) :AbstractClient | ||
| 55 | |||
| 56 | /** | ||
| 57 | * Returns the HTTP adapter. | ||
| 58 | * | ||
| 59 | * @return HttpClient | ||
| 60 | */ | ||
| 61 | public function getHttpClient(): HttpClient | ||
| 65 | |||
| 66 | /** | ||
| 67 | * Get the message factory. | ||
| 68 | * | ||
| 69 | * @return MessageFactory | ||
| 70 | */ | ||
| 71 | public function getMessageFactory(): MessageFactory | ||
| 75 | } | ||
| 76 | 
This check looks for
@paramannotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.