1 | <?php |
||
12 | class Payload |
||
13 | { |
||
14 | const SERVICE_TYPE_LIST = 'ListVoices'; |
||
15 | const SERVICE_TYPE_SPEECH = 'CreateSpeech'; |
||
16 | |||
17 | /** |
||
18 | * @var Options |
||
19 | */ |
||
20 | protected $options; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $payload; |
||
26 | |||
27 | protected $queryText; |
||
28 | protected $serviceUrl = "https://tts.eu-west-1.ivonacloud.com"; |
||
29 | |||
30 | /** |
||
31 | * Get service headers |
||
32 | * @return array |
||
33 | */ |
||
34 | 1 | public function getHeaders() |
|
49 | |||
50 | /** |
||
51 | * Create json object with post parameters |
||
52 | * @return $this |
||
53 | */ |
||
54 | public function createPayload() |
||
69 | |||
70 | /** |
||
71 | * Set payload |
||
72 | * @param $payload |
||
73 | * @return $this |
||
74 | */ |
||
75 | public function setPayload($payload) |
||
80 | |||
81 | /** |
||
82 | * Get post data for service |
||
83 | * @return array |
||
84 | */ |
||
85 | 1 | public function getPayload() |
|
89 | |||
90 | /** |
||
91 | * Get url for service with service type |
||
92 | * @return string |
||
93 | */ |
||
94 | 1 | public function getServiceUrl() |
|
98 | |||
99 | /** |
||
100 | * Check available name for service |
||
101 | * @param string $serviceType |
||
102 | * @return string |
||
103 | * @throw |
||
104 | */ |
||
105 | 2 | protected function checkServiceType($serviceType) |
|
114 | |||
115 | /** |
||
116 | * @return Options |
||
117 | */ |
||
118 | 2 | public function getOptions() |
|
122 | |||
123 | /** |
||
124 | * @param Options $options |
||
125 | * @return $this |
||
126 | */ |
||
127 | 2 | public function setOptions($options) |
|
132 | |||
133 | /** |
||
134 | * @return string |
||
135 | */ |
||
136 | 1 | public function getQueryText() |
|
143 | |||
144 | /** |
||
145 | * @param string $queryText |
||
146 | */ |
||
147 | 1 | public function setQueryText($queryText) |
|
151 | } |
||
152 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: