1 | <?php |
||
12 | class Payload |
||
13 | { |
||
14 | |||
15 | const SERVICE_TYPE_LIST = 'ListVoices'; |
||
16 | const SERVICE_TYPE_SPEECH = 'CreateSpeech'; |
||
17 | |||
18 | /** |
||
19 | * @var Options |
||
20 | */ |
||
21 | protected $options; |
||
22 | |||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | protected $payload; |
||
27 | |||
28 | protected $queryText; |
||
29 | protected $serviceUrl = "https://tts.eu-west-1.ivonacloud.com"; |
||
30 | protected $outputFormatCodec = 'MP3'; |
||
31 | protected $outputSampleRate = '22050'; |
||
32 | protected $parametersRate = 'slow'; |
||
33 | |||
34 | /** |
||
35 | * Get service headers |
||
36 | * @return array |
||
37 | */ |
||
38 | 1 | public function getHeaders() |
|
53 | |||
54 | /** |
||
55 | * Create json object with post parameters |
||
56 | * @return $this |
||
57 | */ |
||
58 | public function createPayload() |
||
73 | |||
74 | /** |
||
75 | * Set payload |
||
76 | * @param $payload |
||
77 | * @return $this |
||
78 | */ |
||
79 | public function setPayload($payload) |
||
84 | |||
85 | /** |
||
86 | * Get post data for service |
||
87 | * @return array |
||
88 | */ |
||
89 | 1 | public function getPayload() |
|
93 | |||
94 | /** |
||
95 | * Get url for service with service type |
||
96 | * @return string |
||
97 | */ |
||
98 | 1 | public function getServiceUrl() |
|
102 | |||
103 | /** |
||
104 | * Check available name for service |
||
105 | * @param string $serviceType |
||
106 | * @return string |
||
107 | * @throw |
||
108 | */ |
||
109 | 2 | protected function checkServiceType($serviceType) |
|
118 | |||
119 | /** |
||
120 | * @return Options |
||
121 | */ |
||
122 | 2 | public function getOptions() |
|
126 | |||
127 | /** |
||
128 | * @param Options $options |
||
129 | * @return $this |
||
130 | */ |
||
131 | 2 | public function setOptions($options) |
|
136 | |||
137 | /** |
||
138 | * @return string |
||
139 | */ |
||
140 | 1 | public function getQueryText() |
|
147 | |||
148 | /** |
||
149 | * @param string $queryText |
||
150 | */ |
||
151 | 1 | public function setQueryText($queryText) |
|
155 | } |
||
156 |
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: