diff --git a/src/Common/Resource/AbstractResource.php b/src/Common/Resource/AbstractResource.php index 89821926..9001bff3 100644 --- a/src/Common/Resource/AbstractResource.php +++ b/src/Common/Resource/AbstractResource.php @@ -113,6 +113,7 @@ protected function getAttrs(array $keys) /** * @template T + * * @param class-string $class * * @return T diff --git a/src/Compute/v2/Api.php b/src/Compute/v2/Api.php index b4ea0e77..cd78e528 100644 --- a/src/Compute/v2/Api.php +++ b/src/Compute/v2/Api.php @@ -484,8 +484,8 @@ public function createConsole(): array 'path' => 'servers/{id}/remote-consoles', 'jsonKey' => 'remote_console', 'params' => [ - 'id' => $this->params->urlId('server'), - 'type' => $this->params->consoleType(), + 'id' => $this->params->urlId('server'), + 'type' => $this->params->consoleType(), 'protocol' => $this->params->consoleProtocol(), ], ]; diff --git a/src/Compute/v2/Enum.php b/src/Compute/v2/Enum.php index cb291917..2d2f56d6 100644 --- a/src/Compute/v2/Enum.php +++ b/src/Compute/v2/Enum.php @@ -17,6 +17,6 @@ abstract class Enum public const CONSOLE_SPICE_HTML5 = 'spice-html5'; public const CONSOLE_SERIAL = 'serial'; - const CONSOLE_PROTOCOL_VNC = 'vnc'; - const CONSOLE_TYPE_NOVNC = 'novnc'; -} \ No newline at end of file + public const CONSOLE_PROTOCOL_VNC = 'vnc'; + public const CONSOLE_TYPE_NOVNC = 'novnc'; +} diff --git a/src/Compute/v2/Models/Server.php b/src/Compute/v2/Models/Server.php index feae60a7..06bfdcf7 100644 --- a/src/Compute/v2/Models/Server.php +++ b/src/Compute/v2/Models/Server.php @@ -326,14 +326,13 @@ public function getConsoleOutput(int $length = -1): string public function createConsole( $protocol = Enum::CONSOLE_PROTOCOL_VNC, $type = Enum::CONSOLE_TYPE_NOVNC - ): array - { + ): array { $response = $this->execute( $this->api->createConsole(), [ 'id' => $this->id, 'protocol' => $protocol, - 'type' => $type + 'type' => $type, ] ); @@ -393,12 +392,11 @@ public function getSerialConsole($type = Enum::CONSOLE_SERIAL): array * Creates an image for the current server. * * @param array $options {@see \OpenStack\Compute\v2\Api::createServerImage} - * @return string */ public function createImage(array $options): string { $options['id'] = $this->id; - $response = $this->execute($this->api->createServerImage(), $options); + $response = $this->execute($this->api->createServerImage(), $options); return Utils::jsonDecode($response)['image_id']; } diff --git a/src/Compute/v2/Params.php b/src/Compute/v2/Params.php index a0f1f22f..744ee897 100644 --- a/src/Compute/v2/Params.php +++ b/src/Compute/v2/Params.php @@ -305,10 +305,10 @@ public function networks(): array 'sentAs' => 'fixed_ip', ], 'tag' => [ - 'type' => self::STRING_TYPE, + 'type' => self::STRING_TYPE, 'description' => 'Helps to identify specific interface', - 'sentAs' => 'tag' - ] + 'sentAs' => 'tag', + ], ], ], ]; diff --git a/src/Networking/v2/Models/InterfaceAttachment.php b/src/Networking/v2/Models/InterfaceAttachment.php index cf0bd6d1..a69dc913 100644 --- a/src/Networking/v2/Models/InterfaceAttachment.php +++ b/src/Networking/v2/Models/InterfaceAttachment.php @@ -51,6 +51,6 @@ class InterfaceAttachment extends OperatorResource implements Listable 'fixed_ips' => 'fixedIps', 'port_state' => 'portState', 'server_id' => 'serverId', - "tag" => "tag", + 'tag' => 'tag', ]; }