Skip to content

Commit 8db7bf1

Browse files
committed
Running php-cs-fixer
Running php-cs-fixer to fix CS drift
1 parent 3b6e932 commit 8db7bf1

File tree

3 files changed

+5
-19
lines changed

3 files changed

+5
-19
lines changed

CommandResult.php

+2-11
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ final class CommandResult implements \JsonSerializable
1919
*/
2020
private $errorOutput;
2121

22-
/**
23-
* @param int $exitCode
24-
* @param string $output
25-
* @param string $errorOutput
26-
*/
2722
public function __construct(int $exitCode, string $output, string $errorOutput)
2823
{
2924
$this->exitCode = $exitCode;
@@ -58,12 +53,8 @@ public function jsonSerialize(): array
5853
public static function jsonUnserialize(string $json): self
5954
{
6055
$data = json_decode($json, true);
61-
if (JSON_ERROR_NONE !== json_last_error()) {
62-
throw new \InvalidArgumentException(sprintf(
63-
'The malformed json given. Error %s and message %s',
64-
json_last_error(),
65-
json_last_error_msg()
66-
));
56+
if (\JSON_ERROR_NONE !== json_last_error()) {
57+
throw new \InvalidArgumentException(sprintf('The malformed json given. Error %s and message %s', json_last_error(), json_last_error_msg()));
6758
}
6859

6960
return new self($data['exitCode'], $data['output'], $data['errorOutput']);

Commands.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44

55
final class Commands
66
{
7-
const RUN_COMMAND = 'run_command';
7+
public const RUN_COMMAND = 'run_command';
88
}

RunCommand.php

+2-7
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ final class RunCommand implements \JsonSerializable
2020
private $options;
2121

2222
/**
23-
* @param string $command
2423
* @param string[] $arguments
2524
* @param string[] $options
2625
*/
@@ -64,12 +63,8 @@ public function jsonSerialize(): array
6463
public static function jsonUnserialize(string $json): self
6564
{
6665
$data = json_decode($json, true);
67-
if (JSON_ERROR_NONE !== json_last_error()) {
68-
throw new \InvalidArgumentException(sprintf(
69-
'The malformed json given. Error %s and message %s',
70-
json_last_error(),
71-
json_last_error_msg()
72-
));
66+
if (\JSON_ERROR_NONE !== json_last_error()) {
67+
throw new \InvalidArgumentException(sprintf('The malformed json given. Error %s and message %s', json_last_error(), json_last_error_msg()));
7368
}
7469

7570
return new self($data['command'], $data['arguments'], $data['options']);

0 commit comments

Comments
 (0)