@@ -14,8 +14,6 @@ |
||
14 | 14 | |
15 | 15 | namespace Netresearch\Kite\ExpressionLanguage; |
16 | 16 | use Netresearch\Kite\Task; |
17 | - |
|
18 | -use Symfony\Component\Console\Question\ChoiceQuestion; |
|
19 | 17 | use Symfony\Component\Console\Question\ConfirmationQuestion; |
20 | 18 | use Symfony\Component\Console\Question\Question; |
21 | 19 | use Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheInterface; |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | { |
123 | 123 | parent::registerFunctions(); |
124 | 124 | $functions = [ |
125 | - 'call' => function (array $values, $function) { |
|
125 | + 'call' => function(array $values, $function) { |
|
126 | 126 | $args = array_slice(func_get_args(), 2); |
127 | 127 | if (array_key_exists($function, $this->functions)) { |
128 | 128 | array_unshift($args, $values); |
@@ -130,29 +130,29 @@ discard block |
||
130 | 130 | } |
131 | 131 | return call_user_func_array($function, $args); |
132 | 132 | }, |
133 | - 'isset' => function (array $values, $var) { |
|
133 | + 'isset' => function(array $values, $var) { |
|
134 | 134 | return $values[self::VARIABLES_KEY]->has($var); |
135 | 135 | }, |
136 | - 'empty' => function (array $values, $var) { |
|
136 | + 'empty' => function(array $values, $var) { |
|
137 | 137 | return !$values[self::VARIABLES_KEY]->has($var) || !$values[self::VARIABLES_KEY]->get($var); |
138 | 138 | }, |
139 | - 'get' => function (array $values, $var) { |
|
139 | + 'get' => function(array $values, $var) { |
|
140 | 140 | return $values[self::VARIABLES_KEY]->get($var); |
141 | 141 | }, |
142 | - 'set' => function (array $values, $var, $value) { |
|
142 | + 'set' => function(array $values, $var, $value) { |
|
143 | 143 | $values[self::VARIABLES_KEY]->set($var, $value); |
144 | 144 | return $value; |
145 | 145 | }, |
146 | - 'confirm' => function (array $values, $question) { |
|
146 | + 'confirm' => function(array $values, $question) { |
|
147 | 147 | return $this->ask($values[self::VARIABLES_KEY], new ConfirmationQuestion("<question>$question</question> [y] ")); |
148 | 148 | }, |
149 | - 'answer' => function (array $values, $question) { |
|
149 | + 'answer' => function(array $values, $question) { |
|
150 | 150 | return $this->ask($values[self::VARIABLES_KEY], new Question("<question>$question</question> ")); |
151 | 151 | }, |
152 | - 'choose' => function (array $values, $question) { |
|
152 | + 'choose' => function(array $values, $question) { |
|
153 | 153 | return $this->ask($values[self::VARIABLES_KEY], new Question("<question>$question</question> ")); |
154 | 154 | }, |
155 | - 'replace' => function (array $values, $search, $replace, $subject, $regex = false) { |
|
155 | + 'replace' => function(array $values, $search, $replace, $subject, $regex = false) { |
|
156 | 156 | $values[self::VARIABLES_KEY]->console->output( |
157 | 157 | '<warning>Expression language function "replace" is deprecated ' |
158 | 158 | . 'and will be removed in 1.6.0 - use preg_replace or str_replace</warning>' |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | foreach ($functions as $name => $function) { |
168 | 168 | $this->register( |
169 | 169 | $name, |
170 | - function () { |
|
170 | + function() { |
|
171 | 171 | |
172 | 172 | }, |
173 | 173 | $function |