Passed
Push — feature/update-dependencies ( 5186b9...c05909 )
by
unknown
06:12
created
src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandValueResolver.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.