1 | <?php |
||
8 | class EngageSpark |
||
9 | { |
||
10 | /** @var HttpClient */ |
||
11 | protected $client; |
||
12 | |||
13 | /** @var array */ |
||
14 | protected $end_points; |
||
15 | |||
16 | /** @var string */ |
||
17 | protected $api_key; |
||
18 | |||
19 | /** @var string */ |
||
20 | protected $org_id; |
||
21 | |||
22 | /** @var string */ |
||
23 | protected $sender_id; |
||
24 | |||
25 | /** |
||
26 | * EngageSpark constructor. |
||
27 | * @param HttpClient $client |
||
28 | */ |
||
29 | public function __construct(HttpClient $client) |
||
34 | |||
35 | /** |
||
36 | * Set protected and public properties. |
||
37 | */ |
||
38 | protected function initializeProperties(): void |
||
47 | |||
48 | /** |
||
49 | * @param $params |
||
50 | * @param string $mode |
||
51 | * @return mixed |
||
52 | * @throws \GuzzleHttp\Exception\GuzzleException |
||
53 | */ |
||
54 | public function send($params, $mode = 'sms') |
||
63 | |||
64 | /** |
||
65 | * @return string |
||
66 | */ |
||
67 | public function getOrgId() |
||
71 | |||
72 | /** |
||
73 | * @return string |
||
74 | */ |
||
75 | public function getSenderId() |
||
79 | |||
80 | /** |
||
81 | * @param $mode |
||
82 | * @return mixed |
||
83 | */ |
||
84 | public function getEndPoint($mode) |
||
88 | |||
89 | /** |
||
90 | * @return string |
||
91 | */ |
||
92 | protected function getApiKey() |
||
96 | |||
97 | /** |
||
98 | * @return array |
||
99 | */ |
||
100 | protected function getHeaders() |
||
107 | |||
108 | /** |
||
109 | * There may be base parameters in the future. Just putting it here. |
||
110 | * |
||
111 | * @param array $params |
||
112 | * @return array |
||
113 | */ |
||
114 | protected function consolidateParams(array $params) |
||
120 | |||
121 | /** |
||
122 | * @param $params |
||
123 | * @return array |
||
124 | */ |
||
125 | protected function getFormattedRequestHeadersAndJsonData($params): array |
||
132 | |||
133 | /** |
||
134 | * @param \Psr\Http\Message\ResponseInterface $response |
||
135 | * @return mixed|\Psr\Http\Message\ResponseInterface |
||
136 | */ |
||
137 | protected function getFormattedResponse(\Psr\Http\Message\ResponseInterface $response) |
||
142 | } |
||
143 |
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..