@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | |
57 | 57 | $this->assertNotNull($message); |
58 | 58 | $this->assertTrue($message instanceof TextMessage); |
59 | - if($message instanceof TextMessage) { |
|
59 | + if ($message instanceof TextMessage) { |
|
60 | 60 | $this->assertEquals($message->getText(), 'Dies ist eine Testnachricht. äöü'); |
61 | 61 | } |
62 | 62 | }); |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | |
93 | 93 | |
94 | 94 | public function testDerivePublicKey() { |
95 | - $this->doTest(function(CryptTool $cryptTool, $prefix){ |
|
95 | + $this->doTest(function(CryptTool $cryptTool, $prefix) { |
|
96 | 96 | $publicKey = $cryptTool->derivePublicKey($cryptTool->hex2bin(Common::getPrivateKey(Constants::myPrivateKey))); |
97 | 97 | $myPublicKey = $cryptTool->hex2bin(Common::getPublicKey(Constants::myPublicKey)); |
98 | 98 | |
@@ -165,12 +165,12 @@ discard block |
||
165 | 165 | |
166 | 166 | // test different strings when comparing |
167 | 167 | $comparisonResult = []; |
168 | - foreach(array( |
|
169 | - 'length' => [$string1, $string1 . 'a'], |
|
168 | + foreach (array( |
|
169 | + 'length' => [$string1, $string1.'a'], |
|
170 | 170 | 'diff' => [$string1, $string2], |
171 | 171 | 'same' => [$string1, $string1] |
172 | 172 | ) as $testName => $strings) { |
173 | - for ($i=0; $i < 3; $i++) { |
|
173 | + for ($i = 0; $i < 3; $i++) { |
|
174 | 174 | // test run with delay |
175 | 175 | $comparisonResult[$testName][$i] = $cryptTool->stringCompare($strings[0], $strings[1]); |
176 | 176 | |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | */ |
191 | 191 | public function testRemoveVar() { |
192 | 192 | $this->doTest(function(CryptTool $cryptTool, $prefix) { |
193 | - foreach(array( |
|
193 | + foreach (array( |
|
194 | 194 | 'hex' => Constants::myPrivateKeyExtract, |
195 | 195 | 'bin' => $cryptTool->hex2bin(Constants::myPrivateKeyExtract) |
196 | 196 | ) as $key => $testVar) { |
@@ -204,12 +204,12 @@ discard block |
||
204 | 204 | } |
205 | 205 | |
206 | 206 | private function doTest(\Closure $c) { |
207 | - foreach(array( |
|
207 | + foreach (array( |
|
208 | 208 | 'Salt' => CryptTool::createInstance(CryptTool::TYPE_SALT), |
209 | 209 | 'Sodium' => CryptTool::createInstance(CryptTool::TYPE_SODIUM) |
210 | 210 | ) as $key => $instance) { |
211 | 211 | |
212 | - if($instance === null) { |
|
212 | + if ($instance === null) { |
|
213 | 213 | echo $key.": could not instance crypt tool\n"; |
214 | 214 | break; |
215 | 215 | } |