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 array |
||
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 | * Get post data for service |
||
76 | * @return array |
||
77 | */ |
||
78 | 1 | public function getPayload() |
|
82 | |||
83 | /** |
||
84 | * Get url for service with service type |
||
85 | * @return string |
||
86 | */ |
||
87 | 1 | public function getServiceUrl() |
|
91 | |||
92 | /** |
||
93 | * Check available name for service |
||
94 | * @param string $serviceType |
||
95 | * @return string |
||
96 | * @throw |
||
97 | */ |
||
98 | 2 | protected function checkServiceType($serviceType) |
|
107 | |||
108 | /** |
||
109 | * @return Options |
||
110 | */ |
||
111 | 2 | public function getOptions() |
|
115 | |||
116 | /** |
||
117 | * @param Options $options |
||
118 | * @return $this |
||
119 | */ |
||
120 | 2 | public function setOptions($options) |
|
125 | |||
126 | /** |
||
127 | * @return string |
||
128 | */ |
||
129 | 1 | public function getQueryText() |
|
136 | |||
137 | /** |
||
138 | * @param string $queryText |
||
139 | */ |
||
140 | 1 | public function setQueryText($queryText) |
|
144 | } |
||
145 |
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..