Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Meldiron committed Nov 26, 2024
1 parent 3f55734 commit 4b0ea79
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 7 deletions.
18 changes: 18 additions & 0 deletions pint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"preset": "psr12",
"exclude": [
],
"rules": {
"array_indentation": true,
"single_import_per_statement": true,
"simplified_null_return": true,
"ordered_imports": {
"sort_algorithm": "alpha",
"imports_order": [
"const",
"class",
"function"
]
}
}
}
3 changes: 2 additions & 1 deletion src/Orchestration/Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ abstract public function run(
string $hostname = '',
bool $remove = false,
string $network = '',
string $restart = self::RESTART_NO): string;
string $restart = self::RESTART_NO
): string;

/**
* Execute Container
Expand Down
2 changes: 1 addition & 1 deletion src/Orchestration/Adapter/DockerAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ public function list(array $filters = []): array

$body = [
'all' => true,
'filters' => empty($filtersSorted) ? new stdClass : json_encode($filtersSorted),
'filters' => empty($filtersSorted) ? new stdClass() : json_encode($filtersSorted),
];

$result = $this->call('http://localhost/containers/json'.'?'.\http_build_query($body), 'GET');
Expand Down
3 changes: 2 additions & 1 deletion src/Orchestration/Adapter/DockerCLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,8 @@ public function list(array $filters = []): array
* @param array<string, string> $vars
* @param array<string, string> $labels
*/
public function run(string $image,
public function run(
string $image,
string $name,
array $command = [],
string $entrypoint = '',
Expand Down
4 changes: 3 additions & 1 deletion src/Orchestration/Exception/Orchestration.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

namespace Utopia\Orchestration\Exception;

class Orchestration extends \Exception {}
class Orchestration extends \Exception
{
}
4 changes: 3 additions & 1 deletion src/Orchestration/Exception/Timeout.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

namespace Utopia\Orchestration\Exception;

class Timeout extends \Exception {}
class Timeout extends \Exception
{
}
2 changes: 1 addition & 1 deletion tests/Orchestration/Adapter/DockerAPITest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static function getOrchestration(): Orchestration
return self::$orchestration;
}

$orchestration = new Orchestration(new DockerAPI);
$orchestration = new Orchestration(new DockerAPI());

return self::$orchestration = $orchestration;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Orchestration/Adapter/DockerCLITest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static function getOrchestration(): Orchestration
return self::$orchestration;
}

$orchestration = new Orchestration(new DockerCLI);
$orchestration = new Orchestration(new DockerCLI());

return self::$orchestration = $orchestration;
}
Expand Down

0 comments on commit 4b0ea79

Please sign in to comment.