1 | <?php |
||
27 | class GuzzleAdapter implements GuzzleAdapterInterface |
||
28 | { |
||
29 | /** @var ClientInterface */ |
||
30 | private $guzzle; |
||
31 | private $extended = false; |
||
32 | |||
33 | 89 | public function __construct(ClientInterface $guzzle) |
|
37 | |||
38 | /** |
||
39 | * {@inheritdoc} |
||
40 | * |
||
41 | * @return ClientInterface |
||
42 | */ |
||
43 | 2 | public function getGuzzle() |
|
47 | |||
48 | /** |
||
49 | * Returns the client base URL |
||
50 | * |
||
51 | * @return string |
||
52 | */ |
||
53 | 2 | public function getBaseUrl() |
|
57 | |||
58 | /** |
||
59 | * Sets the user agent |
||
60 | * |
||
61 | * @param string $userAgent |
||
62 | */ |
||
63 | 1 | public function setUserAgent($userAgent) |
|
67 | |||
68 | /** |
||
69 | * Sets extended mode |
||
70 | * |
||
71 | * Extended mode fetch more data (status, meta, subdefs) in one request |
||
72 | * for a record |
||
73 | * |
||
74 | * @param boolean $extended |
||
75 | */ |
||
76 | 1 | public function setExtended($extended) |
|
80 | |||
81 | /** |
||
82 | * @return boolean |
||
83 | */ |
||
84 | public function isExtended() |
||
88 | |||
89 | /** |
||
90 | * Performs an HTTP request, returns the body response |
||
91 | * |
||
92 | * @param string $method The method |
||
93 | * @param string $path The path to query |
||
94 | * @param array $query An array of query parameters |
||
95 | * @param array $postFields An array of post fields |
||
96 | * @param array $files An array of post files |
||
97 | * @param array $headers An array of request headers |
||
98 | * |
||
99 | * @return string The response body |
||
100 | * |
||
101 | * @throws BadResponseException |
||
102 | * @throws RuntimeException |
||
103 | */ |
||
104 | 82 | public function call( |
|
130 | |||
131 | /** |
||
132 | * Creates a new instance of GuzzleAdapter |
||
133 | * |
||
134 | * @param string $endpoint |
||
135 | * @param EventSubscriberInterface[] $plugins |
||
136 | * @param int $endpointVersion |
||
|
|||
137 | * @return static |
||
138 | */ |
||
139 | 6 | public static function create( |
|
169 | |||
170 | 82 | private function addRequestParameters(RequestInterface $request, $query, $postFields, $files) |
|
194 | } |
||
195 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.