@@ -6,8 +6,8 @@ |
||
6 | 6 | $baseDir = dirname($vendorDir); |
7 | 7 | |
8 | 8 | return array( |
9 | - 'Symfony\\Bundle\\SwiftmailerBundle\\' => array($vendorDir . '/symfony/swiftmailer-bundle'), |
|
10 | - 'Sistema\\Nucleo\\' => array($baseDir . '/Sistema/Nucleo'), |
|
11 | - 'Sistema\\Librerias\\' => array($baseDir . '/Sistema/Librerias'), |
|
12 | - 'Sistema\\Ayudantes\\' => array($baseDir . '/Sistema/Ayudantes'), |
|
9 | + 'Symfony\\Bundle\\SwiftmailerBundle\\' => array($vendorDir.'/symfony/swiftmailer-bundle'), |
|
10 | + 'Sistema\\Nucleo\\' => array($baseDir.'/Sistema/Nucleo'), |
|
11 | + 'Sistema\\Librerias\\' => array($baseDir.'/Sistema/Librerias'), |
|
12 | + 'Sistema\\Ayudantes\\' => array($baseDir.'/Sistema/Ayudantes'), |
|
13 | 13 | ); |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | public static function loadClassLoader($class) |
10 | 10 | { |
11 | 11 | if ('Composer\Autoload\ClassLoader' === $class) { |
12 | - require __DIR__ . '/ClassLoader.php'; |
|
12 | + require __DIR__.'/ClassLoader.php'; |
|
13 | 13 | } |
14 | 14 | } |
15 | 15 | |
@@ -23,17 +23,17 @@ discard block |
||
23 | 23 | self::$loader = $loader = new \Composer\Autoload\ClassLoader(); |
24 | 24 | spl_autoload_unregister(array('ComposerAutoloaderInit37b7553aa02ca13cf02c966b49fecf89', 'loadClassLoader')); |
25 | 25 | |
26 | - $map = require __DIR__ . '/autoload_namespaces.php'; |
|
26 | + $map = require __DIR__.'/autoload_namespaces.php'; |
|
27 | 27 | foreach ($map as $namespace => $path) { |
28 | 28 | $loader->set($namespace, $path); |
29 | 29 | } |
30 | 30 | |
31 | - $map = require __DIR__ . '/autoload_psr4.php'; |
|
31 | + $map = require __DIR__.'/autoload_psr4.php'; |
|
32 | 32 | foreach ($map as $namespace => $path) { |
33 | 33 | $loader->setPsr4($namespace, $path); |
34 | 34 | } |
35 | 35 | |
36 | - $classMap = require __DIR__ . '/autoload_classmap.php'; |
|
36 | + $classMap = require __DIR__.'/autoload_classmap.php'; |
|
37 | 37 | if ($classMap) { |
38 | 38 | $loader->addClassMap($classMap); |
39 | 39 | } |
@@ -482,7 +482,7 @@ discard block |
||
482 | 482 | public function findNamespace($namespace) |
483 | 483 | { |
484 | 484 | $allNamespaces = $this->getNamespaces(); |
485 | - $expr = preg_replace_callback('{([^:]+|)}', function ($matches) { return preg_quote($matches[1]).'[^:]*'; }, $namespace); |
|
485 | + $expr = preg_replace_callback('{([^:]+|)}', function($matches) { return preg_quote($matches[1]).'[^:]*'; }, $namespace); |
|
486 | 486 | $namespaces = preg_grep('{^'.$expr.'}', $allNamespaces); |
487 | 487 | |
488 | 488 | if (empty($namespaces)) { |
@@ -526,7 +526,7 @@ discard block |
||
526 | 526 | public function find($name) |
527 | 527 | { |
528 | 528 | $allCommands = array_keys($this->commands); |
529 | - $expr = preg_replace_callback('{([^:]+|)}', function ($matches) { return preg_quote($matches[1]).'[^:]*'; }, $name); |
|
529 | + $expr = preg_replace_callback('{([^:]+|)}', function($matches) { return preg_quote($matches[1]).'[^:]*'; }, $name); |
|
530 | 530 | $commands = preg_grep('{^'.$expr.'}', $allCommands); |
531 | 531 | |
532 | 532 | if (empty($commands) || count(preg_grep('{^'.$expr.'$}', $commands)) < 1) { |
@@ -552,7 +552,7 @@ discard block |
||
552 | 552 | // filter out aliases for commands which are already on the list |
553 | 553 | if (count($commands) > 1) { |
554 | 554 | $commandList = $this->commands; |
555 | - $commands = array_filter($commands, function ($nameOrAlias) use ($commandList, $commands) { |
|
555 | + $commands = array_filter($commands, function($nameOrAlias) use ($commandList, $commands) { |
|
556 | 556 | $commandName = $commandList[$nameOrAlias]->getName(); |
557 | 557 | |
558 | 558 | return $commandName === $nameOrAlias || !in_array($commandName, $commands); |
@@ -921,12 +921,12 @@ discard block |
||
921 | 921 | return new InputDefinition(array( |
922 | 922 | new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'), |
923 | 923 | |
924 | - new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message'), |
|
925 | - new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message'), |
|
926 | - new InputOption('--verbose', '-v|vv|vvv', InputOption::VALUE_NONE, 'Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug'), |
|
927 | - new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this application version'), |
|
928 | - new InputOption('--ansi', '', InputOption::VALUE_NONE, 'Force ANSI output'), |
|
929 | - new InputOption('--no-ansi', '', InputOption::VALUE_NONE, 'Disable ANSI output'), |
|
924 | + new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message'), |
|
925 | + new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message'), |
|
926 | + new InputOption('--verbose', '-v|vv|vvv', InputOption::VALUE_NONE, 'Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug'), |
|
927 | + new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this application version'), |
|
928 | + new InputOption('--ansi', '', InputOption::VALUE_NONE, 'Force ANSI output'), |
|
929 | + new InputOption('--no-ansi', '', InputOption::VALUE_NONE, 'Disable ANSI output'), |
|
930 | 930 | new InputOption('--no-interaction', '-n', InputOption::VALUE_NONE, 'Do not ask any interactive question'), |
931 | 931 | )); |
932 | 932 | } |
@@ -1082,7 +1082,7 @@ discard block |
||
1082 | 1082 | } |
1083 | 1083 | } |
1084 | 1084 | |
1085 | - $alternatives = array_filter($alternatives, function ($lev) use ($threshold) { return $lev < 2*$threshold; }); |
|
1085 | + $alternatives = array_filter($alternatives, function($lev) use ($threshold) { return $lev < 2 * $threshold; }); |
|
1086 | 1086 | asort($alternatives); |
1087 | 1087 | |
1088 | 1088 | return array_keys($alternatives); |
@@ -103,7 +103,7 @@ |
||
103 | 103 | ; |
104 | 104 | |
105 | 105 | $output = $this->output; |
106 | - $process->run(function ($type, $data) use ($output) { |
|
106 | + $process->run(function($type, $data) use ($output) { |
|
107 | 107 | $output->writeln($data); |
108 | 108 | }); |
109 | 109 |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | $output->writeln($messages); |
56 | 56 | |
57 | - $result = $this->askAndValidate($output, '> ', function ($picked) use ($choices, $errorMessage, $multiselect) { |
|
57 | + $result = $this->askAndValidate($output, '> ', function($picked) use ($choices, $errorMessage, $multiselect) { |
|
58 | 58 | // Collapse all spaces. |
59 | 59 | $selectedChoices = str_replace(' ', '', $picked); |
60 | 60 | |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | { |
342 | 342 | $that = $this; |
343 | 343 | |
344 | - $interviewer = function () use ($output, $question, $default, $autocomplete, $that) { |
|
344 | + $interviewer = function() use ($output, $question, $default, $autocomplete, $that) { |
|
345 | 345 | return $that->ask($output, $question, $default, $autocomplete); |
346 | 346 | }; |
347 | 347 | |
@@ -370,7 +370,7 @@ discard block |
||
370 | 370 | { |
371 | 371 | $that = $this; |
372 | 372 | |
373 | - $interviewer = function () use ($output, $question, $fallback, $that) { |
|
373 | + $interviewer = function() use ($output, $question, $fallback, $that) { |
|
374 | 374 | return $that->askHiddenResponse($output, $question, $fallback); |
375 | 375 | }; |
376 | 376 |
@@ -51,7 +51,7 @@ |
||
51 | 51 | |
52 | 52 | $that = $this; |
53 | 53 | |
54 | - $interviewer = function () use ($output, $question, $that) { |
|
54 | + $interviewer = function() use ($output, $question, $that) { |
|
55 | 55 | return $that->doAsk($output, $question); |
56 | 56 | }; |
57 | 57 |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | $self = $this; |
437 | 437 | $output = $this->output; |
438 | 438 | $messages = $this->messages; |
439 | - $this->overwrite(preg_replace_callback("{%([a-z\-_]+)(?:\:([^%]+))?%}i", function ($matches) use ($self, $output, $messages) { |
|
439 | + $this->overwrite(preg_replace_callback("{%([a-z\-_]+)(?:\:([^%]+))?%}i", function($matches) use ($self, $output, $messages) { |
|
440 | 440 | if ($formatter = $self::getPlaceholderFormatterDefinition($matches[1])) { |
441 | 441 | $text = call_user_func($formatter, $self, $output); |
442 | 442 | } elseif (isset($messages[$matches[1]])) { |
@@ -538,7 +538,7 @@ discard block |
||
538 | 538 | private static function initPlaceholderFormatters() |
539 | 539 | { |
540 | 540 | return array( |
541 | - 'bar' => function (ProgressBar $bar, OutputInterface $output) { |
|
541 | + 'bar' => function(ProgressBar $bar, OutputInterface $output) { |
|
542 | 542 | $completeBars = floor($bar->getMaxSteps() > 0 ? $bar->getProgressPercent() * $bar->getBarWidth() : $bar->getProgress() % $bar->getBarWidth()); |
543 | 543 | $display = str_repeat($bar->getBarCharacter(), $completeBars); |
544 | 544 | if ($completeBars < $bar->getBarWidth()) { |
@@ -548,10 +548,10 @@ discard block |
||
548 | 548 | |
549 | 549 | return $display; |
550 | 550 | }, |
551 | - 'elapsed' => function (ProgressBar $bar) { |
|
551 | + 'elapsed' => function(ProgressBar $bar) { |
|
552 | 552 | return Helper::formatTime(time() - $bar->getStartTime()); |
553 | 553 | }, |
554 | - 'remaining' => function (ProgressBar $bar) { |
|
554 | + 'remaining' => function(ProgressBar $bar) { |
|
555 | 555 | if (!$bar->getMaxSteps()) { |
556 | 556 | throw new \LogicException('Unable to display the remaining time if the maximum number of steps is not set.'); |
557 | 557 | } |
@@ -564,7 +564,7 @@ discard block |
||
564 | 564 | |
565 | 565 | return Helper::formatTime($remaining); |
566 | 566 | }, |
567 | - 'estimated' => function (ProgressBar $bar) { |
|
567 | + 'estimated' => function(ProgressBar $bar) { |
|
568 | 568 | if (!$bar->getMaxSteps()) { |
569 | 569 | throw new \LogicException('Unable to display the estimated time if the maximum number of steps is not set.'); |
570 | 570 | } |
@@ -577,16 +577,16 @@ discard block |
||
577 | 577 | |
578 | 578 | return Helper::formatTime($estimated); |
579 | 579 | }, |
580 | - 'memory' => function (ProgressBar $bar) { |
|
580 | + 'memory' => function(ProgressBar $bar) { |
|
581 | 581 | return Helper::formatMemory(memory_get_usage(true)); |
582 | 582 | }, |
583 | - 'current' => function (ProgressBar $bar) { |
|
583 | + 'current' => function(ProgressBar $bar) { |
|
584 | 584 | return str_pad($bar->getProgress(), $bar->getStepWidth(), ' ', STR_PAD_LEFT); |
585 | 585 | }, |
586 | - 'max' => function (ProgressBar $bar) { |
|
586 | + 'max' => function(ProgressBar $bar) { |
|
587 | 587 | return $bar->getMaxSteps(); |
588 | 588 | }, |
589 | - 'percent' => function (ProgressBar $bar) { |
|
589 | + 'percent' => function(ProgressBar $bar) { |
|
590 | 590 | return floor($bar->getProgressPercent() * 100); |
591 | 591 | }, |
592 | 592 | ); |
@@ -128,7 +128,7 @@ |
||
128 | 128 | } |
129 | 129 | |
130 | 130 | $this->write("\n\n"); |
131 | - $this->write(implode("\n", array_map(function ($commandName) { |
|
131 | + $this->write(implode("\n", array_map(function($commandName) { |
|
132 | 132 | return '* '.$commandName; |
133 | 133 | }, $namespace['commands']))); |
134 | 134 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | $this->application->setAutoExit(false); |
27 | 27 | $this->application->register('foo') |
28 | 28 | ->addArgument('foo') |
29 | - ->setCode(function ($input, $output) { $output->writeln('foo'); }) |
|
29 | + ->setCode(function($input, $output) { $output->writeln('foo'); }) |
|
30 | 30 | ; |
31 | 31 | |
32 | 32 | $this->tester = new ApplicationTester($this->application); |