Skip to content

Commit 315b760

Browse files
committed
Fix return type
1 parent 4d69240 commit 315b760

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

samples/compute/v2/servers/get_server_rdp_console.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@
1616

1717
$server = $compute->getServer(['id' => '{serverId}']);
1818

19+
/** @var array $console */
1920
$console = $server->getRDPConsole();

samples/compute/v2/servers/get_server_serial_console.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@
1616

1717
$server = $compute->getServer(['id' => '{serverId}']);
1818

19+
/** @var array $console */
1920
$console = $server->getSerialConsole();

samples/compute/v2/servers/get_server_spice_console.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@
1616

1717
$server = $compute->getServer(['id' => '{serverId}']);
1818

19+
/** @var array $console */
1920
$console = $server->getSpiceConsole();

samples/compute/v2/servers/get_server_vnc_console.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@
1616

1717
$server = $compute->getServer(['id' => '{serverId}']);
1818

19+
/** @var array $console */
1920
$console = $server->getVncConsole();

src/Compute/v2/Models/Server.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,9 @@ public function revertResize()
235235
* @param string $type The type of VNC console: novnc|xvpvnc.
236236
* Defaults to novnc.
237237
*
238-
* @return mixed
238+
* @return array
239239
*/
240-
public function getVncConsole($type = Enum::CONSOLE_NOVNC)
240+
public function getVncConsole($type = Enum::CONSOLE_NOVNC): array
241241
{
242242
$response = $this->execute($this->api->getVncConsole(), ['id' => $this->id, 'type' => $type]);
243243
return Utils::jsonDecode($response)['console'];
@@ -248,9 +248,9 @@ public function getVncConsole($type = Enum::CONSOLE_NOVNC)
248248
*
249249
* @param string $type The type of VNC console: rdp-html5 (default).
250250
*
251-
* @return mixed
251+
* @return array
252252
*/
253-
public function getRDPConsole($type = Enum::CONSOLE_RDP_HTML5)
253+
public function getRDPConsole($type = Enum::CONSOLE_RDP_HTML5): array
254254
{
255255
$response = $this->execute($this->api->getRDPConsole(), ['id' => $this->id, 'type' => $type]);
256256
return Utils::jsonDecode($response)['console'];
@@ -261,9 +261,9 @@ public function getRDPConsole($type = Enum::CONSOLE_RDP_HTML5)
261261
*
262262
* @param string $type The type of VNC console: spice-html5.
263263
*
264-
* @return mixed
264+
* @return array
265265
*/
266-
public function getSpiceConsole($type = Enum::CONSOLE_SPICE_HTML5)
266+
public function getSpiceConsole($type = Enum::CONSOLE_SPICE_HTML5): array
267267
{
268268
$response = $this->execute($this->api->getSpiceConsole(), ['id' => $this->id, 'type' => $type]);
269269
return Utils::jsonDecode($response)['console'];
@@ -274,9 +274,9 @@ public function getSpiceConsole($type = Enum::CONSOLE_SPICE_HTML5)
274274
*
275275
* @param string $type The type of VNC console: serial.
276276
*
277-
* @return mixed
277+
* @return array
278278
*/
279-
public function getSerialConsole($type = Enum::CONSOLE_SERIAL)
279+
public function getSerialConsole($type = Enum::CONSOLE_SERIAL): array
280280
{
281281
$response = $this->execute($this->api->getSerialConsole(), ['id' => $this->id, 'type' => $type]);
282282
return Utils::jsonDecode($response)['console'];

0 commit comments

Comments
 (0)