@@ -98,7 +98,7 @@ |
||
98 | 98 | public function addOutputToFile($filename) |
99 | 99 | { |
100 | 100 | // make sure $filename isn't a reserved name |
101 | - switch($filename) |
|
101 | + switch ($filename) |
|
102 | 102 | { |
103 | 103 | case 'stdout': |
104 | 104 | case 'stderr': |
@@ -98,8 +98,7 @@ |
||
98 | 98 | public function addOutputToFile($filename) |
99 | 99 | { |
100 | 100 | // make sure $filename isn't a reserved name |
101 | - switch($filename) |
|
102 | - { |
|
101 | + switch($filename) { |
|
103 | 102 | case 'stdout': |
104 | 103 | case 'stderr': |
105 | 104 | case 'null': |
@@ -230,8 +230,8 @@ |
||
230 | 230 | { |
231 | 231 | // if we get here, then yes we do |
232 | 232 | return sprintf(ConsoleColor::ESCAPE_SEQUENCE, \implode(';', $style)) |
233 | - . $output |
|
234 | - . sprintf(ConsoleColor::ESCAPE_SEQUENCE, ConsoleColor::NONE); |
|
233 | + . $output |
|
234 | + . sprintf(ConsoleColor::ESCAPE_SEQUENCE, ConsoleColor::NONE); |
|
235 | 235 | } |
236 | 236 | |
237 | 237 | // ================================================================== |
@@ -82,7 +82,7 @@ |
||
82 | 82 | public $argumentsHeadingStyle = null; |
83 | 83 | public $failedPhaseStyle = null; |
84 | 84 | |
85 | - protected $outputHandles = []; |
|
85 | + protected $outputHandles = []; |
|
86 | 86 | |
87 | 87 | public function __construct() |
88 | 88 | { |
@@ -171,8 +171,7 @@ discard block |
||
171 | 171 | |
172 | 172 | public function setColourMode($mode) |
173 | 173 | { |
174 | - switch ($mode) |
|
175 | - { |
|
174 | + switch ($mode) { |
|
176 | 175 | case OutputPlugin::COLOUR_MODE_OFF: |
177 | 176 | foreach ($this->outputHandles as $index => $outputHandle) { |
178 | 177 | if ($outputHandle['colour']) { |
@@ -183,8 +182,7 @@ discard block |
||
183 | 182 | |
184 | 183 | case OutputPlugin::COLOUR_MODE_ON: |
185 | 184 | foreach ($this->outputHandles as $index => $outputHandle) { |
186 | - switch ($index) |
|
187 | - { |
|
185 | + switch ($index) { |
|
188 | 186 | case 'stdout': |
189 | 187 | case 'stderr': |
190 | 188 | $this->outputHandles[$index]['colour'] = true; |
@@ -73,8 +73,7 @@ |
||
73 | 73 | $phaseResult = $this->getNewPhaseResult(); |
74 | 74 | |
75 | 75 | // do we have anything to do? |
76 | - if (!$story->hasActions()) |
|
77 | - { |
|
76 | + if (!$story->hasActions()) { |
|
78 | 77 | $phaseResult->setContinuePlaying( |
79 | 78 | $phaseResult::HASNOACTIONS, |
80 | 79 | "story has no action instructions" |
@@ -113,8 +113,7 @@ discard block |
||
113 | 113 | $story = $st->getStory(); |
114 | 114 | |
115 | 115 | // do we have anything to do? |
116 | - if (!$story->hasPerPhaseSetup()) |
|
117 | - { |
|
116 | + if (!$story->hasPerPhaseSetup()) { |
|
118 | 117 | return; |
119 | 118 | } |
120 | 119 | |
@@ -136,8 +135,7 @@ discard block |
||
136 | 135 | $story = $st->getStory(); |
137 | 136 | |
138 | 137 | // do we have anything to do? |
139 | - if ($story->hasPerPhaseTeardown()) |
|
140 | - { |
|
138 | + if ($story->hasPerPhaseTeardown()) { |
|
141 | 139 | // get the callback to call |
142 | 140 | $callbacks = $story->getPerPhaseTeardown(); |
143 | 141 |
@@ -75,8 +75,7 @@ |
||
75 | 75 | |
76 | 76 | try { |
77 | 77 | // do we have anything to do? |
78 | - if (!$story->hasPostTestInspection()) |
|
79 | - { |
|
78 | + if (!$story->hasPostTestInspection()) { |
|
80 | 79 | $phaseResult->setContinuePlaying( |
81 | 80 | $phaseResult::HASNOACTIONS, |
82 | 81 | "story has no post-test inspection instructions" |
@@ -73,8 +73,7 @@ |
||
73 | 73 | $phaseResult = $this->getNewPhaseResult(); |
74 | 74 | |
75 | 75 | // do we have anything to do? |
76 | - if (!$story->hasPreTestInspection()) |
|
77 | - { |
|
76 | + if (!$story->hasPreTestInspection()) { |
|
78 | 77 | $phaseResult->setContinuePlaying( |
79 | 78 | $phaseResult::HASNOACTIONS, |
80 | 79 | "story has no pre-test inspection instructions" |
@@ -75,8 +75,7 @@ |
||
75 | 75 | |
76 | 76 | try { |
77 | 77 | // do we have anything to do? |
78 | - if (!$story->hasPreTestPrediction()) |
|
79 | - { |
|
78 | + if (!$story->hasPreTestPrediction()) { |
|
80 | 79 | $phaseResult->setContinuePlaying( |
81 | 80 | $phaseResult::HASNOACTIONS, |
82 | 81 | "story has no pre-test prediction instructions; skipping" |
@@ -64,7 +64,7 @@ |
||
64 | 64 | public function doPhase($phaseResults) |
65 | 65 | { |
66 | 66 | // shorthand |
67 | - $st = $this->st; |
|
67 | + $st = $this->st; |
|
68 | 68 | |
69 | 69 | // our result object |
70 | 70 | $phaseResult = $this->getNewPhaseResult(); |
@@ -59,13 +59,13 @@ discard block |
||
59 | 59 | |
60 | 60 | class TableHandlersHelper |
61 | 61 | { |
62 | - /** |
|
63 | - * @param string $type |
|
64 | - */ |
|
65 | - public function runHandlers(StoryTeller $st, $type) |
|
66 | - { |
|
67 | - // shorthand |
|
68 | - $output = $st->getOutput(); |
|
62 | + /** |
|
63 | + * @param string $type |
|
64 | + */ |
|
65 | + public function runHandlers(StoryTeller $st, $type) |
|
66 | + { |
|
67 | + // shorthand |
|
68 | + $output = $st->getOutput(); |
|
69 | 69 | |
70 | 70 | // Do we have any persistent tables to cleanup? |
71 | 71 | $runtimeConfig = $st->getRuntimeConfig(); |
@@ -103,5 +103,5 @@ discard block |
||
103 | 103 | } |
104 | 104 | exit(1); |
105 | 105 | } |
106 | - } |
|
106 | + } |
|
107 | 107 | } |
108 | 108 | \ No newline at end of file |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | // Do we have any persistent tables to cleanup? |
71 | 71 | $runtimeConfig = $st->getRuntimeConfig(); |
72 | - if (!isset($runtimeConfig->storyplayer, $runtimeConfig->storyplayer->tables)){ |
|
72 | + if (!isset($runtimeConfig->storyplayer, $runtimeConfig->storyplayer->tables)) { |
|
73 | 73 | // there are no tables at all |
74 | 74 | return; |
75 | 75 | } |
@@ -83,12 +83,12 @@ discard block |
||
83 | 83 | |
84 | 84 | // Take a look at all of our process list tables |
85 | 85 | foreach ($runtimeConfig->storyplayer->tables as $key => $value) { |
86 | - $className = "cleanup".ucfirst($key); |
|
86 | + $className = "cleanup" . ucfirst($key); |
|
87 | 87 | try { |
88 | 88 | $st->$className($key)->$type(); |
89 | - } catch(E5xx_NoMatchingActions $e){ |
|
89 | + } catch (E5xx_NoMatchingActions $e) { |
|
90 | 90 | // We don't know about a cleanup module for this, SHOUT LOUDLY |
91 | - $missingCleanupHandlers[] = "Missing cleanup module for '{$key}'".PHP_EOL; |
|
91 | + $missingCleanupHandlers[] = "Missing cleanup module for '{$key}'" . PHP_EOL; |
|
92 | 92 | } |
93 | 93 | } |
94 | 94 |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | // Do we have any persistent tables to cleanup? |
71 | 71 | $runtimeConfig = $st->getRuntimeConfig(); |
72 | - if (!isset($runtimeConfig->storyplayer, $runtimeConfig->storyplayer->tables)){ |
|
72 | + if (!isset($runtimeConfig->storyplayer, $runtimeConfig->storyplayer->tables)) { |
|
73 | 73 | // there are no tables at all |
74 | 74 | return; |
75 | 75 | } |
@@ -86,7 +86,8 @@ discard block |
||
86 | 86 | $className = "cleanup".ucfirst($key); |
87 | 87 | try { |
88 | 88 | $st->$className($key)->$type(); |
89 | - } catch(E5xx_NoMatchingActions $e){ |
|
89 | + } |
|
90 | + catch(E5xx_NoMatchingActions $e) { |
|
90 | 91 | // We don't know about a cleanup module for this, SHOUT LOUDLY |
91 | 92 | $missingCleanupHandlers[] = "Missing cleanup module for '{$key}'".PHP_EOL; |
92 | 93 | } |