Skip to content

Commit

Permalink
Apply php-cs-fixer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
giogurto-grande authored and github-actions[bot] committed Jun 19, 2024
1 parent 118804a commit f3c5b85
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 14 deletions.
1 change: 1 addition & 0 deletions src/Common/Resource/AbstractResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ protected function getAttrs(array $keys)

/**
* @template T
*
* @param class-string<T> $class
*
* @return T
Expand Down
4 changes: 2 additions & 2 deletions src/Compute/v2/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
],
];
Expand Down
6 changes: 3 additions & 3 deletions src/Compute/v2/Enum.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
public const CONSOLE_PROTOCOL_VNC = 'vnc';
public const CONSOLE_TYPE_NOVNC = 'novnc';
}
8 changes: 3 additions & 5 deletions src/Compute/v2/Models/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]
);

Expand Down Expand Up @@ -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'];
}
Expand Down
6 changes: 3 additions & 3 deletions src/Compute/v2/Params.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
],
],
],
];
Expand Down
2 changes: 1 addition & 1 deletion src/Networking/v2/Models/InterfaceAttachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ class InterfaceAttachment extends OperatorResource implements Listable
'fixed_ips' => 'fixedIps',
'port_state' => 'portState',
'server_id' => 'serverId',
"tag" => "tag",
'tag' => 'tag',
];
}

0 comments on commit f3c5b85

Please sign in to comment.