Skip to content

Commit

Permalink
Merge pull request #58 from utopia-php/revert-cli-version
Browse files Browse the repository at this point in the history
Revert: CLI version
  • Loading branch information
Meldiron authored Nov 26, 2024
2 parents 6a422ef + 4b0ea79 commit 1feea59
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 135 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"require": {
"php": ">=8.0",
"utopia-php/cli": "0.19.*"
"utopia-php/cli": "0.16.*"
},
"require-dev": {
"phpunit/phpunit": "^9.3",
Expand Down
150 changes: 23 additions & 127 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 1feea59

Please sign in to comment.