1 | <?php |
||
33 | abstract class AbstractRequest |
||
34 | { |
||
35 | /** |
||
36 | * @var array |
||
37 | */ |
||
38 | protected $config; |
||
39 | |||
40 | /** |
||
41 | * @var Client $client Cliente implementation |
||
42 | */ |
||
43 | protected $client; |
||
44 | |||
45 | /** |
||
46 | * @var string $baseUrl Base API URL |
||
47 | */ |
||
48 | protected $baseUrl; |
||
49 | |||
50 | /** |
||
51 | * @var string $uri String that identifies resource |
||
52 | */ |
||
53 | private $uri; |
||
54 | |||
55 | /** |
||
56 | * Initializes new AbstractNuxeoIntegration |
||
57 | * |
||
58 | * @param HTTPClient $client HTTPClient implementation |
||
59 | * @param string $baseUrl Base API URL |
||
60 | */ |
||
61 | public function __construct(HTTPClient $client, string $baseUrl) |
||
67 | |||
68 | /** |
||
69 | * Get URI concatenating base url api with resource end point |
||
70 | * |
||
71 | * @return string URI end point |
||
72 | * |
||
73 | * @throws Exception If AbstractRequest::baseUrl or AbstractRequest::uri was empty |
||
74 | */ |
||
75 | protected function getURI(): string |
||
83 | |||
84 | /** |
||
85 | * Set url parameters |
||
86 | * |
||
87 | * @param array $parameters array with parameters that must be setted |
||
88 | * |
||
89 | * <code> |
||
90 | * $this->setParameters([ |
||
91 | * ':paramkey' => 'my param value' |
||
92 | * ]); |
||
93 | * </code> |
||
94 | * |
||
95 | * @throws InvalidArgumentException If parameters param was empty |
||
96 | * @throws Exception If parametes not match with request endPoint |
||
97 | * |
||
98 | * @return void |
||
99 | */ |
||
100 | protected function setParameters(array $parameters) |
||
124 | } |
||
125 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..