1 | <?php |
||
32 | abstract class AbstractRequest |
||
33 | { |
||
34 | /** |
||
35 | * @var array |
||
36 | */ |
||
37 | protected $config; |
||
38 | |||
39 | /** |
||
40 | * @var Client $httpClient Cliente implementation |
||
41 | */ |
||
42 | protected $httpClient; |
||
43 | |||
44 | /** |
||
45 | * @var string $baseUrl Base API URL |
||
46 | */ |
||
47 | protected $baseUrl; |
||
48 | |||
49 | /** |
||
50 | * @var string $uri String that identifies resource |
||
51 | */ |
||
52 | private $uri; |
||
53 | |||
54 | /** |
||
55 | * Initializes new AbstractNuxeoIntegration |
||
56 | * |
||
57 | * @param HTTPClient $httpClient HTTP Client implementation |
||
58 | * @param string $baseUrl Base API URL |
||
59 | */ |
||
60 | public function __construct(HTTPClient $httpClient, string $baseUrl) |
||
66 | |||
67 | /** |
||
68 | * Get URI concatenating base url api with resource end point |
||
69 | * |
||
70 | * @return string URI end point |
||
71 | * |
||
72 | * @throws Exception If AbstractRequest::baseUrl or AbstractRequest::uri was empty |
||
73 | */ |
||
74 | protected function getURI(): string |
||
82 | |||
83 | /** |
||
84 | * Set url parameters |
||
85 | * |
||
86 | * @param array $parameters array with parameters that must be setted |
||
87 | * |
||
88 | * <code> |
||
89 | * $this->setParameters([ |
||
90 | * ':paramkey' => 'my param value' |
||
91 | * ]); |
||
92 | * </code> |
||
93 | * |
||
94 | * @throws InvalidArgumentException If parameters param was empty |
||
95 | * @throws Exception If parametes not match with request endPoint |
||
96 | * |
||
97 | * @return void |
||
98 | */ |
||
99 | protected function setParameters(array $parameters): void |
||
119 | } |
||
120 |
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..