@@ -239,7 +239,7 @@ |
||
| 239 | 239 | $this->scriptVars[$matches[1]] = $dialog->askAndValidate( |
| 240 | 240 | $output, |
| 241 | 241 | '<info>Please enter a value for <comment>' . $matches[1] . '</comment>:</info> ', |
| 242 | - function ($value) { |
|
| 242 | + function($value) { |
|
| 243 | 243 | if ($value == '') { |
| 244 | 244 | throw new RuntimeException('Please enter a value'); |
| 245 | 245 | } |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | HELP; |
| 127 | 127 | $this->setHelp($help); |
| 128 | 128 | |
| 129 | - $this->notEmptyCallback = function ($input) { |
|
| 129 | + $this->notEmptyCallback = function($input) { |
|
| 130 | 130 | if (empty($input)) { |
| 131 | 131 | throw new InvalidArgumentException('Please enter a value'); |
| 132 | 132 | } |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | $type = $this->getHelper('dialog')->askAndValidate( |
| 228 | 228 | $output, |
| 229 | 229 | $question, |
| 230 | - function ($typeInput) use ($commandConfig) { |
|
| 230 | + function($typeInput) use ($commandConfig) { |
|
| 231 | 231 | if (!in_array($typeInput, range(1, count($commandConfig['magento-packages'])))) { |
| 232 | 232 | throw new InvalidArgumentException('Invalid type'); |
| 233 | 233 | } |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | |
| 241 | 241 | if ($input->getOption('magentoVersion')) { |
| 242 | 242 | $type = $input->getOption('magentoVersion'); |
| 243 | - if ($type !== (string)(int)$type) { |
|
| 243 | + if ($type !== (string) (int) $type) { |
|
| 244 | 244 | $type = $this->getPackageNumberByName($type); |
| 245 | 245 | } |
| 246 | 246 | } elseif ($input->getOption('magentoVersionByName')) { |
@@ -277,8 +277,8 @@ discard block |
||
| 277 | 277 | private function getPackageNumberByName($name) |
| 278 | 278 | { |
| 279 | 279 | // directly filter integer strings |
| 280 | - if ($name === (string)(int)$name) { |
|
| 281 | - return (int)$name; |
|
| 280 | + if ($name === (string) (int) $name) { |
|
| 281 | + return (int) $name; |
|
| 282 | 282 | } |
| 283 | 283 | |
| 284 | 284 | $magentoPackages = $this->commandConfig['magento-packages']; |
@@ -752,7 +752,7 @@ discard block |
||
| 752 | 752 | $defaults['admin_email'] |
| 753 | 753 | ); |
| 754 | 754 | |
| 755 | - $validateBaseUrl = function ($input) { |
|
| 755 | + $validateBaseUrl = function($input) { |
|
| 756 | 756 | if (!preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $input)) { |
| 757 | 757 | throw new InvalidArgumentException('Please enter a valid URL'); |
| 758 | 758 | } |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | |
| 62 | 62 | /** @var DialogHelper $dialog */ |
| 63 | 63 | $dialog = $this->getHelper('dialog'); |
| 64 | - $indexCodes = $dialog->askAndValidate($output, $question, function ($typeInput) use ($indexerList) { |
|
| 64 | + $indexCodes = $dialog->askAndValidate($output, $question, function($typeInput) use ($indexerList) { |
|
| 65 | 65 | if (strstr($typeInput, ',')) { |
| 66 | 66 | $typeInputs = \N98\Util\BinaryString::trimExplodeEmpty(',', $typeInput); |
| 67 | 67 | } else { |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * this file is part of magerun |
|
| 4 | - * |
|
| 5 | - * @author Tom Klingenberg <https://github.com/ktomk> |
|
| 6 | - */ |
|
| 3 | + * this file is part of magerun |
|
| 4 | + * |
|
| 5 | + * @author Tom Klingenberg <https://github.com/ktomk> |
|
| 6 | + */ |
|
| 7 | 7 | namespace N98\Util; |
| 8 | 8 | |
| 9 | 9 | /** |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * this file is part of magerun |
|
| 4 | - * |
|
| 5 | - * @author Tom Klingenberg <https://github.com/ktomk> |
|
| 6 | - */ |
|
| 3 | + * this file is part of magerun |
|
| 4 | + * |
|
| 5 | + * @author Tom Klingenberg <https://github.com/ktomk> |
|
| 6 | + */ |
|
| 7 | 7 | namespace N98\Util\Console\Helper\Table\Renderer; |
| 8 | 8 | |
| 9 | 9 | use Symfony\Component\Console\Helper\Table; |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * this file is part of magerun |
|
| 4 | - * |
|
| 5 | - * @author Tom Klingenberg <https://github.com/ktomk> |
|
| 6 | - */ |
|
| 3 | + * this file is part of magerun |
|
| 4 | + * |
|
| 5 | + * @author Tom Klingenberg <https://github.com/ktomk> |
|
| 6 | + */ |
|
| 7 | 7 | namespace N98\Util\Console\Helper\Table\Renderer; |
| 8 | 8 | |
| 9 | 9 | use DOMDocument; |
@@ -258,7 +258,7 @@ |
||
| 258 | 258 | $definitions, |
| 259 | 259 | $resolved |
| 260 | 260 | ); |
| 261 | - $resolvedList = array_merge($resolvedList, $tables); |
|
| 261 | + $resolvedList = array_merge($resolvedList, $tables); |
|
| 262 | 262 | } |
| 263 | 263 | continue; |
| 264 | 264 | } |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | $storeId = $this->askAndValidate( |
| 84 | 84 | $output, |
| 85 | 85 | $question, |
| 86 | - function ($typeInput) use ($stores) { |
|
| 86 | + function($typeInput) use ($stores) { |
|
| 87 | 87 | if (!isset($stores[$typeInput - 1])) { |
| 88 | 88 | throw new InvalidArgumentException('Invalid store'); |
| 89 | 89 | } |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | $websiteId = $this->askAndValidate( |
| 141 | 141 | $output, |
| 142 | 142 | $question, |
| 143 | - function ($typeInput) use ($websites) { |
|
| 143 | + function($typeInput) use ($websites) { |
|
| 144 | 144 | if (!isset($websites[$typeInput - 1])) { |
| 145 | 145 | throw new InvalidArgumentException('Invalid store'); |
| 146 | 146 | } |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | $value = $this->askAndValidate( |
| 251 | 251 | $output, |
| 252 | 252 | $question, |
| 253 | - function ($inputValue) use ($constraints, $name) { |
|
| 253 | + function($inputValue) use ($constraints, $name) { |
|
| 254 | 254 | $errors = $this->validateValue($name, $inputValue, $constraints); |
| 255 | 255 | if ($errors->count() > 0) { |
| 256 | 256 | throw new InvalidArgumentException($errors[0]->getMessage()); |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * this file is part of magerun |
|
| 4 | - * |
|
| 5 | - * @author Tom Klingenberg <https://github.com/ktomk> |
|
| 6 | - */ |
|
| 3 | + * this file is part of magerun |
|
| 4 | + * |
|
| 5 | + * @author Tom Klingenberg <https://github.com/ktomk> |
|
| 6 | + */ |
|
| 7 | 7 | namespace N98\Util\Console\Helper; |
| 8 | 8 | |
| 9 | 9 | use Symfony\Component\Console\ConsoleEvents; |