@@ -44,9 +44,9 @@ discard block |
||
44 | 44 | $this->assertIsValidCommandStructure($data); |
45 | 45 | |
46 | 46 | $commandNameParts = []; |
47 | - $found = preg_match('~^(\w+):([\w\\.]+)$~', (string)$data['command']['name'], $commandNameParts); |
|
47 | + $found = preg_match('~^(\w+):([\w\\.]+)$~', (string) $data['command']['name'], $commandNameParts); |
|
48 | 48 | if ($found !== 1) { |
49 | - $message = sprintf('Command does not have a valid command name %s', (string)$data['command']['name']); |
|
49 | + $message = sprintf('Command does not have a valid command name %s', (string) $data['command']['name']); |
|
50 | 50 | throw new BadCommandRequestException( |
51 | 51 | [$message], |
52 | 52 | $message, |
@@ -60,10 +60,10 @@ discard block |
||
60 | 60 | |
61 | 61 | /** @var AbstractCommand $command */ |
62 | 62 | $command = new $commandClassName; |
63 | - $command->UUID = (string)$data['command']['uuid']; |
|
63 | + $command->UUID = (string) $data['command']['uuid']; |
|
64 | 64 | |
65 | - foreach ((array)$data['command']['payload'] as $property => $value) { |
|
66 | - $properlyCasedProperty = lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', (string)$property)))); |
|
65 | + foreach ((array) $data['command']['payload'] as $property => $value) { |
|
66 | + $properlyCasedProperty = lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', (string) $property)))); |
|
67 | 67 | $command->$properlyCasedProperty = $value; |
68 | 68 | } |
69 | 69 |