@@ -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 | } |
@@ -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, |