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