@@ -10,9 +10,9 @@ |
||
10 | 10 | |
11 | 11 | public final function execute($string, &$child) |
12 | 12 | { |
13 | - $this->word = (join($string)); |
|
14 | - $this->child = $child; |
|
15 | - return $this->algorithm($string, $child); |
|
13 | + $this->word = (join($string)); |
|
14 | + $this->child = $child; |
|
15 | + return $this->algorithm($string, $child); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | public final function algorithm($string) |
@@ -22,8 +22,10 @@ |
||
22 | 22 | $input = fgets(STDIN, 1024); |
23 | 23 | $input = trim($input); |
24 | 24 | parseInput($input, $trie); |
25 | - if($input == 'quit') $running = false; |
|
26 | -} |
|
25 | + if($input == 'quit') { |
|
26 | + $running = false; |
|
27 | + } |
|
28 | + } |
|
27 | 29 | |
28 | 30 | function parseInput($input, $trie) |
29 | 31 | { |