@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | if ($file !== null) { |
73 | 73 | # check for secret in file |
74 | 74 | if (!is_readable($file)) { |
75 | - $output->writeln('<error>ERROR: file "' . $file . '" is not readable.'); |
|
75 | + $output->writeln('<error>ERROR: file "'.$file.'" is not readable.'); |
|
76 | 76 | exit(1); |
77 | 77 | } |
78 | 78 | |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | '<question>Number of shared secrets to create</question> <comment>[3]</comment>: ', 3 |
96 | 96 | ); |
97 | 97 | $question->setValidator( |
98 | - static function ($a) { |
|
98 | + static function($a) { |
|
99 | 99 | if (!is_int($a) && !ctype_digit($a)) { |
100 | 100 | throw new UnexpectedValueException('The number of shared secrets must be an integer'); |
101 | 101 | } |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | '<question>Number of shared secrets required</question> <comment>[2]</comment>: ', 2 |
110 | 110 | ); |
111 | 111 | $question->setValidator( |
112 | - function ($a) { |
|
112 | + function($a) { |
|
113 | 113 | if (!is_int($a) && !ctype_digit($a)) { |
114 | 114 | throw new UnexpectedValueException('The number of shared secrets required must be an integer'); |
115 | 115 | } |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | * Calculate modulo of any given number using prime |
191 | 191 | * |
192 | 192 | * @param int Number |
193 | - * @return int Module of number |
|
193 | + * @return string Module of number |
|
194 | 194 | */ |
195 | 195 | protected function modulo($number) |
196 | 196 | { |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | * Calculates the inverse modulo |
224 | 224 | * |
225 | 225 | * @param int $number |
226 | - * @return int |
|
226 | + * @return string |
|
227 | 227 | */ |
228 | 228 | protected function inverseModulo($number) |
229 | 229 | { |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | * |
240 | 240 | * @param array $keyX |
241 | 241 | * @param int $threshold |
242 | - * @return array |
|
242 | + * @return string |
|
243 | 243 | * @throws \RuntimeException |
244 | 244 | */ |
245 | 245 | protected function reverseCoefficients(array $keyX, $threshold): array |
@@ -33,7 +33,7 @@ |
||
33 | 33 | */ |
34 | 34 | public function __construct($max = PHP_INT_MAX, $min = 1) |
35 | 35 | { |
36 | - if((int)$min < 1) { |
|
36 | + if ((int)$min < 1) { |
|
37 | 37 | throw new \OutOfRangeException('The min number must be a positive integer.'); |
38 | 38 | } |
39 | 39 |
@@ -35,7 +35,7 @@ |
||
35 | 35 | */ |
36 | 36 | public function __construct($bytes = PHP_INT_SIZE, $forceStrong = true) |
37 | 37 | { |
38 | - if((int)$bytes < 1) { |
|
38 | + if ((int)$bytes < 1) { |
|
39 | 39 | throw new \OutOfRangeException('The length of the desired string of bytes. Must be a positive integer.'); |
40 | 40 | } |
41 | 41 |