From c6236a74779db4860699cfe89a4e0ce97d031229 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 12 Jun 2024 12:14:59 +0100 Subject: [PATCH] chore: fmt --- src/Orchestration/Adapter/DockerAPI.php | 9 +++++++-- src/Orchestration/Adapter/DockerCLI.php | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Orchestration/Adapter/DockerAPI.php b/src/Orchestration/Adapter/DockerAPI.php index f99133c..3a6dfa9 100644 --- a/src/Orchestration/Adapter/DockerAPI.php +++ b/src/Orchestration/Adapter/DockerAPI.php @@ -15,8 +15,12 @@ class DockerAPI extends Adapter { /** * Constructor + * + * @param string $username + * @param string $password + * @param string $email */ - public function __construct(?string $username = null, ?string $password = null, ?string $email = null) + public function __construct(string $username = null, string $password = null, string $email = null) { if ($username && $password && $email) { $this->registryAuth = base64_encode(json_encode([ @@ -261,10 +265,11 @@ public function networkDisconnect(string $container, string $network, bool $forc /** * Get usage stats of containers * + * @param string $container * @param array $filters * @return array */ - public function getStats(?string $container = null, array $filters = []): array + public function getStats(string $container = null, array $filters = []): array { // List ahead of time, since API does not allow listing all usage stats $containerIds = []; diff --git a/src/Orchestration/Adapter/DockerCLI.php b/src/Orchestration/Adapter/DockerCLI.php index 002753a..a95450d 100644 --- a/src/Orchestration/Adapter/DockerCLI.php +++ b/src/Orchestration/Adapter/DockerCLI.php @@ -172,7 +172,7 @@ private function parseIOStats(string $stats) foreach ($units as $unit => $value) { if (\str_ends_with($inStr, $unit)) { $inUnit = $unit; - } + } if (\str_ends_with($outStr, $unit)) { $outUnit = $unit; }