@@ -30,18 +30,18 @@ discard block |
||
30 | 30 | header('Content-type: text/plain'); |
31 | 31 | |
32 | 32 | $keywords = new Behat\Gherkin\Keywords\ArrayKeywords(array( |
33 | - 'en' => array( |
|
34 | - 'feature' => 'Feature', |
|
35 | - 'background' => 'Background', |
|
36 | - 'scenario' => 'Scenario', |
|
37 | - 'scenario_outline' => 'Scenario Outline', |
|
38 | - 'examples' => 'Examples', |
|
39 | - 'given' => 'Given', |
|
40 | - 'when' => 'When', |
|
41 | - 'then' => 'Then', |
|
42 | - 'and' => 'And', |
|
43 | - 'but' => 'But' |
|
44 | - ), |
|
33 | + 'en' => array( |
|
34 | + 'feature' => 'Feature', |
|
35 | + 'background' => 'Background', |
|
36 | + 'scenario' => 'Scenario', |
|
37 | + 'scenario_outline' => 'Scenario Outline', |
|
38 | + 'examples' => 'Examples', |
|
39 | + 'given' => 'Given', |
|
40 | + 'when' => 'When', |
|
41 | + 'then' => 'Then', |
|
42 | + 'and' => 'And', |
|
43 | + 'but' => 'But' |
|
44 | + ), |
|
45 | 45 | )); |
46 | 46 | $lexer = new Behat\Gherkin\Lexer($keywords); |
47 | 47 | $parser = new Behat\Gherkin\Parser($lexer); |
@@ -51,23 +51,23 @@ discard block |
||
51 | 51 | } |
52 | 52 | catch (Exception $ex) { |
53 | 53 | echo $ex->getMessage() . "\n"; |
54 | - exit; |
|
54 | + exit; |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | foreach ($feature->getScenarios() as $scenario) { |
58 | - if ($scenario instanceof OutlineNode) { |
|
59 | - echo $scenario->getExampleTable() . "\n\n"; |
|
60 | - } |
|
61 | - elseif ($scenario instanceof ScenarioNode) { |
|
62 | - foreach ($scenario->getSteps() as $step) { |
|
63 | - foreach ($step->getArguments() as $argument) { |
|
64 | - if ($argument instanceof TableNode) { |
|
65 | - echo $argument . "\n\n"; |
|
66 | - } |
|
67 | - } |
|
68 | - // print_r($step); |
|
69 | - } |
|
70 | - } |
|
58 | + if ($scenario instanceof OutlineNode) { |
|
59 | + echo $scenario->getExampleTable() . "\n\n"; |
|
60 | + } |
|
61 | + elseif ($scenario instanceof ScenarioNode) { |
|
62 | + foreach ($scenario->getSteps() as $step) { |
|
63 | + foreach ($step->getArguments() as $argument) { |
|
64 | + if ($argument instanceof TableNode) { |
|
65 | + echo $argument . "\n\n"; |
|
66 | + } |
|
67 | + } |
|
68 | + // print_r($step); |
|
69 | + } |
|
70 | + } |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | print_r($feature); |
@@ -49,19 +49,19 @@ |
||
49 | 49 | try { |
50 | 50 | $feature = $parser->parse($feature); |
51 | 51 | } |
52 | -catch (Exception $ex) { |
|
52 | +catch ( Exception $ex ) { |
|
53 | 53 | echo $ex->getMessage() . "\n"; |
54 | 54 | exit; |
55 | 55 | } |
56 | 56 | |
57 | -foreach ($feature->getScenarios() as $scenario) { |
|
58 | - if ($scenario instanceof OutlineNode) { |
|
57 | +foreach ( $feature->getScenarios() as $scenario ) { |
|
58 | + if ( $scenario instanceof OutlineNode ) { |
|
59 | 59 | echo $scenario->getExampleTable() . "\n\n"; |
60 | 60 | } |
61 | - elseif ($scenario instanceof ScenarioNode) { |
|
62 | - foreach ($scenario->getSteps() as $step) { |
|
63 | - foreach ($step->getArguments() as $argument) { |
|
64 | - if ($argument instanceof TableNode) { |
|
61 | + elseif ( $scenario instanceof ScenarioNode ) { |
|
62 | + foreach ( $scenario->getSteps() as $step ) { |
|
63 | + foreach ( $step->getArguments() as $argument ) { |
|
64 | + if ( $argument instanceof TableNode ) { |
|
65 | 65 | echo $argument . "\n\n"; |
66 | 66 | } |
67 | 67 | } |
@@ -25,14 +25,14 @@ |
||
25 | 25 | * |
26 | 26 | */ |
27 | 27 | protected function kToF( $amount ) { |
28 | - return ($amount - 273.15) * 9/5 + 32; |
|
28 | + return ($amount - 273.15) * 9 / 5 + 32; |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
32 | 32 | * |
33 | 33 | */ |
34 | 34 | protected function fToK( $amount ) { |
35 | - return ($amount - 32) * 5/9 + 273.15; |
|
35 | + return ($amount - 32) * 5 / 9 + 273.15; |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |