@@ -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 | } |
@@ -74,8 +74,7 @@ discard block |
||
74 | 74 | $phaseResult = $this->getNewPhaseResult(); |
75 | 75 | |
76 | 76 | // do we have anything to do? |
77 | - if (!$story->hasTestCanRunCheck()) |
|
78 | - { |
|
77 | + if (!$story->hasTestCanRunCheck()) { |
|
79 | 78 | $phaseResult->setContinuePlaying( |
80 | 79 | $phaseResult::COMPLETED, |
81 | 80 | "story can always run" |
@@ -154,8 +153,7 @@ discard block |
||
154 | 153 | ); |
155 | 154 | $storyResult->setStoryHasBeenSkipped($phaseResult); |
156 | 155 | } |
157 | - catch (Exception $e) |
|
158 | - { |
|
156 | + catch (Exception $e) { |
|
159 | 157 | // something went wrong ... the test cannot continue |
160 | 158 | $phaseResult->setPlayingFailed( |
161 | 159 | $phaseResult::ERROR, |
@@ -65,7 +65,7 @@ |
||
65 | 65 | public function doPhase($thingBeingPlayed = null) |
66 | 66 | { |
67 | 67 | // shorthand |
68 | - $st = $this->st; |
|
68 | + $st = $this->st; |
|
69 | 69 | |
70 | 70 | // our return value |
71 | 71 | $phaseResult = $this->getNewPhaseResult(); |
@@ -73,8 +73,7 @@ discard block |
||
73 | 73 | $phaseResult = $this->getNewPhaseResult(); |
74 | 74 | |
75 | 75 | // do we have anything to do? |
76 | - if (!$story->hasTestSetup()) |
|
77 | - { |
|
76 | + if (!$story->hasTestSetup()) { |
|
78 | 77 | $phaseResult->setContinuePlaying( |
79 | 78 | $phaseResult::HASNOACTIONS, |
80 | 79 | "story has no test setup instructions" |
@@ -122,8 +121,7 @@ discard block |
||
122 | 121 | ); |
123 | 122 | $storyResult->setStoryIsIncomplete($phaseResult); |
124 | 123 | } |
125 | - catch (Exception $e) |
|
126 | - { |
|
124 | + catch (Exception $e) { |
|
127 | 125 | // something went wrong ... the test cannot continue |
128 | 126 | $phaseResult->setPlayingFailed( |
129 | 127 | $phaseResult::ERROR, |
@@ -73,8 +73,7 @@ discard block |
||
73 | 73 | $phaseResult = $this->getNewPhaseResult(); |
74 | 74 | |
75 | 75 | // do we have anything to do? |
76 | - if (!$story->hasTestTeardown()) |
|
77 | - { |
|
76 | + if (!$story->hasTestTeardown()) { |
|
78 | 77 | $phaseResult->setContinuePlaying( |
79 | 78 | $phaseResult::HASNOACTIONS, |
80 | 79 | "story has no test teardown instructions" |
@@ -124,8 +123,7 @@ discard block |
||
124 | 123 | ); |
125 | 124 | $storyResult->setStoryIsIncomplete($phaseResult); |
126 | 125 | } |
127 | - catch (Exception $e) |
|
128 | - { |
|
126 | + catch (Exception $e) { |
|
129 | 127 | // we still want to continue at this stage |
130 | 128 | $phaseResult->setContinuePlaying( |
131 | 129 | $phaseResult::ERROR, |
@@ -78,8 +78,7 @@ discard block |
||
78 | 78 | public function startAction($message, $codeLine = null) |
79 | 79 | { |
80 | 80 | // do we have an open action? |
81 | - if (!$this->action || !$this->action->getIsOpen()) |
|
82 | - { |
|
81 | + if (!$this->action || !$this->action->getIsOpen()) { |
|
83 | 82 | $openItem = $this->action = new Action_LogItem($this->injectables, 1); |
84 | 83 | } |
85 | 84 | else { |
@@ -93,8 +92,7 @@ discard block |
||
93 | 92 | public function closeAllOpenActions() |
94 | 93 | { |
95 | 94 | // do we have any empty log items? |
96 | - if (!$this->action) |
|
97 | - { |
|
95 | + if (!$this->action) { |
|
98 | 96 | return; |
99 | 97 | } |
100 | 98 |