@@ -74,8 +74,8 @@ discard block |
||
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | /** |
| 77 | - * @param $question |
|
| 78 | - * @param $default |
|
| 77 | + * @param string $question |
|
| 78 | + * @param string $default |
|
| 79 | 79 | * @param string $sep |
| 80 | 80 | * |
| 81 | 81 | * @return string |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | |
| 91 | 91 | /** |
| 92 | 92 | * @param \Symfony\Component\Console\Output\OutputInterface $output |
| 93 | - * @param $text |
|
| 93 | + * @param string $text |
|
| 94 | 94 | * @param string $style |
| 95 | 95 | */ |
| 96 | 96 | protected function writeSection(OutputInterface $output, $text, $style = 'bg=blue;fg=white') |
@@ -109,8 +109,8 @@ discard block |
||
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | /** |
| 112 | - * @param $text |
|
| 113 | - * @param $style |
|
| 112 | + * @param string $text |
|
| 113 | + * @param string $style |
|
| 114 | 114 | * |
| 115 | 115 | * @return string |
| 116 | 116 | */ |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | /** |
| 45 | 45 | * @param Key|KeyInterface $key |
| 46 | 46 | * |
| 47 | - * @return \Defuse\Crypto\Key|\Defuse\Crypto\KeyProtectedByPassword |
|
| 47 | + * @return \Defuse\Crypto\Key |
|
| 48 | 48 | */ |
| 49 | 49 | private function unlockKey(Key $key) |
| 50 | 50 | { |
@@ -135,6 +135,9 @@ |
||
| 135 | 135 | $this->helper = null; |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | + /** |
|
| 139 | + * @param string[] $input |
|
| 140 | + */ |
|
| 138 | 141 | private function getInputStream($input) |
| 139 | 142 | { |
| 140 | 143 | $stream = fopen('php://memory', 'r+', false); |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | $random = \bin2hex(random_bytes(20)); |
| 77 | 77 | $this->symfonyStyle->newLine(); |
| 78 | 78 | $question = new Question($this->getQuestion('Insert your authentication secret or use this one randomly generated', $random), $random); |
| 79 | - $question->setValidator(function ($secret) { |
|
| 79 | + $question->setValidator(function($secret) { |
|
| 80 | 80 | if (!ctype_print($secret)) { |
| 81 | 81 | throw new \RuntimeException(sprintf('The authentication secret is not printable', $secret)); |
| 82 | 82 | } |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | $dh->start(spl_object_hash($process), "Find {$options['dir']}", 'START'), |
| 207 | 207 | )); |
| 208 | 208 | |
| 209 | - $process->run(function ($type, $buffer) use ($process, $output, $dh) { |
|
| 209 | + $process->run(function($type, $buffer) use ($process, $output, $dh) { |
|
| 210 | 210 | $output->writeln($dh->progress(spl_object_hash($process), $buffer, Process::ERR === $type)); |
| 211 | 211 | }); |
| 212 | 212 | |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | ->info('Encoded key or path to .crypto file. If key is null, it generates a different random key for each request.') |
| 42 | 42 | ->beforeNormalization() |
| 43 | 43 | ->ifString() |
| 44 | - ->then(function ($v) { |
|
| 44 | + ->then(function($v) { |
|
| 45 | 45 | if (is_file($v) && is_readable($v)) { |
| 46 | 46 | return array('path' => $v); |
| 47 | 47 | } |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | ->end() |
| 52 | 52 | ->validate() |
| 53 | 53 | ->ifArray() |
| 54 | - ->then(function ($v) { |
|
| 54 | + ->then(function($v) { |
|
| 55 | 55 | $path = $v['path']; |
| 56 | 56 | $key = $v['key']; |
| 57 | 57 | |