GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 94fb56...8daf4e )
by Rich
13s
created
src/ASN1.php 2 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -45,25 +45,25 @@  discard block
 block discarded – undo
45 45
         $this->pemInitialDataCheck($keypair);
46 46
 
47 47
         $ecpemstruct = array(
48
-                             'sequence_beg' => '30',
49
-                             'total_len'    => '74',
50
-                             'int_sec_beg'  => '02',
51
-                             'int_sec_len'  => '01',
52
-                             'int_sec_val'  => '01',
53
-                             'oct_sec_beg'  => '04',
54
-                             'oct_sec_len'  => '20',
55
-                             'oct_sec_val'  => $keypair[0],
56
-                             'a0_ele_beg'   => 'a0',
57
-                             'a0_ele_len'   => '07',
58
-                             'obj_id_beg'   => '06',
59
-                             'obj_id_len'   => '05',
60
-                             'obj_id_val'   => '2b8104000a',
61
-                             'a1_ele_beg'   => 'a1',
62
-                             'a1_ele_len'   => '44',
63
-                             'bit_str_beg'  => '03',
64
-                             'bit_str_len'  => '42',
65
-                             'bit_str_val'  => '00' . $keypair[1],
66
-                             );
48
+                                'sequence_beg' => '30',
49
+                                'total_len'    => '74',
50
+                                'int_sec_beg'  => '02',
51
+                                'int_sec_len'  => '01',
52
+                                'int_sec_val'  => '01',
53
+                                'oct_sec_beg'  => '04',
54
+                                'oct_sec_len'  => '20',
55
+                                'oct_sec_val'  => $keypair[0],
56
+                                'a0_ele_beg'   => 'a0',
57
+                                'a0_ele_len'   => '07',
58
+                                'obj_id_beg'   => '06',
59
+                                'obj_id_len'   => '05',
60
+                                'obj_id_val'   => '2b8104000a',
61
+                                'a1_ele_beg'   => 'a1',
62
+                                'a1_ele_len'   => '44',
63
+                                'bit_str_beg'  => '03',
64
+                                'bit_str_len'  => '42',
65
+                                'bit_str_val'  => '00' . $keypair[1],
66
+                                );
67 67
 
68 68
         $dec = trim(implode($ecpemstruct));
69 69
 
@@ -86,9 +86,9 @@  discard block
 block discarded – undo
86 86
         $this->pemDataLenCheck($decoded);
87 87
 
88 88
         $ecpemstruct = array(
89
-                             'oct_sec_val'  => substr($decoded, 14, 64),
90
-                             'obj_id_val'   => substr($decoded, 86, 10),
91
-                             'bit_str_val'  => substr($decoded, 106),
89
+                                'oct_sec_val'  => substr($decoded, 14, 64),
90
+                                'obj_id_val'   => substr($decoded, 86, 10),
91
+                                'bit_str_val'  => substr($decoded, 106),
92 92
                             );
93 93
 
94 94
         $this->pemOidCheck($ecpemstruct['obj_id_val']);
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
         $this->pemKeyLenCheck(array($private_key, $public_key));
100 100
 
101 101
         return array(
102
-                     'private_key' => $private_key,
103
-                     'public_key'  => $public_key
102
+                        'private_key' => $private_key,
103
+                        'public_key'  => $public_key
104 104
                     );
105 105
     }
106 106
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -62,14 +62,14 @@  discard block
 block discarded – undo
62 62
                              'a1_ele_len'   => '44',
63 63
                              'bit_str_beg'  => '03',
64 64
                              'bit_str_len'  => '42',
65
-                             'bit_str_val'  => '00' . $keypair[1],
65
+                             'bit_str_val'  => '00'.$keypair[1],
66 66
                              );
67 67
 
68 68
         $dec = trim(implode($ecpemstruct));
69 69
 
70 70
         $this->pemDataLenCheck($dec);
71 71
 
72
-        return '-----BEGIN EC PRIVATE KEY-----' . "\r\n" . chunk_split(base64_encode($this->binConv($dec)), 64) . '-----END EC PRIVATE KEY-----';
72
+        return '-----BEGIN EC PRIVATE KEY-----'."\r\n".chunk_split(base64_encode($this->binConv($dec)), 64).'-----END EC PRIVATE KEY-----';
73 73
     }
74 74
 
75 75
     /**
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
         $this->pemOidCheck($ecpemstruct['obj_id_val']);
95 95
 
96 96
         $private_key = $ecpemstruct['oct_sec_val'];
97
-        $public_key  = '04' . $ecpemstruct['bit_str_val'];
97
+        $public_key  = '04'.$ecpemstruct['bit_str_val'];
98 98
 
99 99
         $this->pemKeyLenCheck(array($private_key, $public_key));
100 100
 
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
         $oid_string = '';
220 220
 
221 221
         foreach ($oid as $key => $value) {
222
-            $oid_string .= $value . ".";
222
+            $oid_string .= $value.".";
223 223
         }
224 224
 
225 225
         $oid_string = substr($oid_string, 0, -1);
Please login to merge, or discard this patch.
src/Signature.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -81,8 +81,8 @@  discard block
 block discarded – undo
81 81
         $this->raw_signature     = '';
82 82
 
83 83
         $this->P = array(
84
-                         'x' => $this->Gx,
85
-                         'y' => $this->Gy
84
+                            'x' => $this->Gx,
85
+                            'y' => $this->Gy
86 86
                         );
87 87
 
88 88
         $this->keyUtil = new \Phactor\Key;
@@ -149,9 +149,9 @@  discard block
 block discarded – undo
149 149
         }
150 150
 
151 151
         $signature = array(
152
-                           'r' => $this->addHexPrefix(str_pad($this->encodeHex($r, false), 64, "0", STR_PAD_LEFT)),
153
-                           's' => $this->addHexPrefix(str_pad($this->encodeHex($s, false), 64, "0", STR_PAD_LEFT))
154
-                          );
152
+                            'r' => $this->addHexPrefix(str_pad($this->encodeHex($r, false), 64, "0", STR_PAD_LEFT)),
153
+                            's' => $this->addHexPrefix(str_pad($this->encodeHex($s, false), 64, "0", STR_PAD_LEFT))
154
+                            );
155 155
 
156 156
         $this->r_coordinate = $signature['r'];
157 157
         $this->s_coordinate = $signature['s'];
@@ -248,10 +248,10 @@  discard block
 block discarded – undo
248 248
         $retval = array(
249 249
                         'bin_r' => $this->msbCheck($r[0]) . $r,
250 250
                         'bin_s' => $this->msbCheck($s[0]) . $s
251
-                       );
251
+                        );
252 252
 
253 253
         $seq = chr(0x02) . chr(strlen($retval['bin_r'])) . $retval['bin_r'] .
254
-               chr(0x02) . chr(strlen($retval['bin_s'])) . $retval['bin_s'];
254
+                chr(0x02) . chr(strlen($retval['bin_s'])) . $retval['bin_s'];
255 255
 
256 256
         return bin2hex(chr(0x30) . chr(strlen($seq)) . $seq);
257 257
     }
@@ -270,19 +270,19 @@  discard block
 block discarded – undo
270 270
 
271 271
         /* This is the main structure we'll use for storing our parsed signature. */
272 272
         $ecdsa_struct = array(
273
-                              'sigstart' => '',
274
-                              'siglen'   => '',
275
-                              'rtype'    => '',
276
-                              'rlen'     => '',
277
-                              'roffset'  => 0,
278
-                              'r'        => '',
279
-                              'stype'    => '',
280
-                              'slen'     => '',
281
-                              'soffset'  => 0,
282
-                              's'        => '',
283
-                              'original' => '',
284
-                              'totallen' => 0
285
-                             );
273
+                                'sigstart' => '',
274
+                                'siglen'   => '',
275
+                                'rtype'    => '',
276
+                                'rlen'     => '',
277
+                                'roffset'  => 0,
278
+                                'r'        => '',
279
+                                'stype'    => '',
280
+                                'slen'     => '',
281
+                                'soffset'  => 0,
282
+                                's'        => '',
283
+                                'original' => '',
284
+                                'totallen' => 0
285
+                                );
286 286
 
287 287
         $ecdsa_struct['original'] = $signature;
288 288
         $ecdsa_struct['totallen'] = strlen($signature);
@@ -333,8 +333,8 @@  discard block
 block discarded – undo
333 333
         $this->RangeCheck($ecdsa_struct['r']);
334 334
 
335 335
         return array(
336
-                     'r' => $ecdsa_struct['r'],
337
-                     's' => $ecdsa_struct['s']
336
+                        'r' => $ecdsa_struct['r'],
337
+                        's' => $ecdsa_struct['s']
338 338
                     );
339 339
     }
340 340
 
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
             do {
130 130
                 /* Get the message hash and a new random number */
131
-                $e = $this->decodeHex('0x' . hash('sha256', $message));
131
+                $e = $this->decodeHex('0x'.hash('sha256', $message));
132 132
                 $k = $this->SecureRandomNumber();
133 133
 
134 134
                 /* Calculate a new curve point from R=k*G (x1,y1) */
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     public function Verify($sig, $msg, $pubkey)
174 174
     {
175 175
         if (true === empty($sig) || true === empty($msg) || true === empty($pubkey)) {
176
-            throw new \Exception('The signature, public key and message parameters are required to verify a signature.  Value received for first parameter was "' . var_export($sig, true) . '", second parameter was "' . var_export($msg, true) . '" and third parameter was "' . var_export($pubkey, true) . '".');
176
+            throw new \Exception('The signature, public key and message parameters are required to verify a signature.  Value received for first parameter was "'.var_export($sig, true).'", second parameter was "'.var_export($msg, true).'" and third parameter was "'.var_export($pubkey, true).'".');
177 177
         }
178 178
 
179 179
         $e         = '';
@@ -246,14 +246,14 @@  discard block
 block discarded – undo
246 246
         $s = $this->binConv($this->CoordinateCheck($s));
247 247
 
248 248
         $retval = array(
249
-                        'bin_r' => $this->msbCheck($r[0]) . $r,
250
-                        'bin_s' => $this->msbCheck($s[0]) . $s
249
+                        'bin_r' => $this->msbCheck($r[0]).$r,
250
+                        'bin_s' => $this->msbCheck($s[0]).$s
251 251
                        );
252 252
 
253
-        $seq = chr(0x02) . chr(strlen($retval['bin_r'])) . $retval['bin_r'] .
254
-               chr(0x02) . chr(strlen($retval['bin_s'])) . $retval['bin_s'];
253
+        $seq = chr(0x02).chr(strlen($retval['bin_r'])).$retval['bin_r'].
254
+               chr(0x02).chr(strlen($retval['bin_s'])).$retval['bin_s'];
255 255
 
256
-        return bin2hex(chr(0x30) . chr(strlen($seq)) . $seq);
256
+        return bin2hex(chr(0x30).chr(strlen($seq)).$seq);
257 257
     }
258 258
 
259 259
     /**
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
     private function ecdsaSigTotalLenCheck($value)
346 346
     {
347 347
         if ($value != '140' && $value != '142' && $value != '144') {
348
-            throw new \Exception('Invalid ECDSA signature provided!  Length is out of range for a correct signature.  Value checked was "' . var_export($value, true) . '".');
348
+            throw new \Exception('Invalid ECDSA signature provided!  Length is out of range for a correct signature.  Value checked was "'.var_export($value, true).'".');
349 349
         }
350 350
     }
351 351
 
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
     private function derRecordStartCheck($value)
359 359
     {
360 360
         if ($value != '30') {
361
-            throw new \Exception('Invalid ECDSA signature provided!  Unknown signature format.  Value checked was "' . var_export($value, true) . '".');
361
+            throw new \Exception('Invalid ECDSA signature provided!  Unknown signature format.  Value checked was "'.var_export($value, true).'".');
362 362
         }
363 363
     }
364 364
 
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
     private function derRecordTotalLenCheck($value)
372 372
     {
373 373
         if ($value != '44' && $value != '45' && $value != '46') {
374
-            throw new \Exception('Invalid ECDSA signature provided!  DER record length is invalid.  Value checked was "' . var_export($value, true) . '".');
374
+            throw new \Exception('Invalid ECDSA signature provided!  DER record length is invalid.  Value checked was "'.var_export($value, true).'".');
375 375
         }
376 376
     }
377 377
 
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
     private function derDataTypeCheck($value)
385 385
     {
386 386
         if ($value != '02') {
387
-            throw new \Exception('Invalid ECDSA signature provided!  DER record length is invalid.  Value checked was "' . var_export($value, true) . '".');
387
+            throw new \Exception('Invalid ECDSA signature provided!  DER record length is invalid.  Value checked was "'.var_export($value, true).'".');
388 388
         }
389 389
     }
390 390
 
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
     private function derDataLenCheck($value)
398 398
     {
399 399
         if ($value != '20' && $value != '21') {
400
-            throw new \Exception('Invalid ECDSA signature provided!  The coordinate length is invalid.  Value checked was "' . var_export($value, true) . '".');
400
+            throw new \Exception('Invalid ECDSA signature provided!  The coordinate length is invalid.  Value checked was "'.var_export($value, true).'".');
401 401
         }
402 402
     }
403 403
 
Please login to merge, or discard this patch.
src/Point.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -267,9 +267,9 @@  discard block
 block discarded – undo
267 267
     public function GenerateNewPoint($ladder = true)
268 268
     {
269 269
         $P = array(
270
-                   'x' => $this->Gx,
271
-                   'y' => $this->Gy
272
-                  );
270
+                    'x' => $this->Gx,
271
+                    'y' => $this->Gy
272
+                    );
273 273
 
274 274
         do {
275 275
             $random_number = $this->SecureRandomNumber();
@@ -285,10 +285,10 @@  discard block
 block discarded – undo
285 285
         }
286 286
 
287 287
         return array(
288
-                     'random_number' => $random_number,
289
-                     'R'             => $R,
290
-                     'Rx_hex'        => $Rx_hex,
291
-                     'Ry_hex'        => $Ry_hex
288
+                        'random_number' => $random_number,
289
+                        'R'             => $R,
290
+                        'Rx_hex'        => $Rx_hex,
291
+                        'Ry_hex'        => $Ry_hex
292 292
                     );
293 293
     }
294 294
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
                 return true;
189 189
             }
190 190
 
191
-            throw new \Exception('Point test failed! Cannot continue. I tested the point: ' . var_export($P, true) . ' but got the point: ' . var_export($test_point, true));
191
+            throw new \Exception('Point test failed! Cannot continue. I tested the point: '.var_export($P, true).' but got the point: '.var_export($test_point, true));
192 192
 
193 193
         } catch (\Exception $e) {
194 194
             // TODO: Do something useful here...
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
             $Rx_hex = str_pad($this->encodeHex($R['x']), 64, "0", STR_PAD_LEFT);
280 280
             $Ry_hex = str_pad($this->encodeHex($R['y']), 64, "0", STR_PAD_LEFT);
281 281
         } else {
282
-            throw new \Exception('Point test failed! Cannot continue. I got the point: ' . var_export($R, true));
282
+            throw new \Exception('Point test failed! Cannot continue. I got the point: '.var_export($R, true));
283 283
         }
284 284
 
285 285
         return array(
Please login to merge, or discard this patch.
src/BC.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -240,7 +240,7 @@
 block discarded – undo
240 240
             case 'unk':
241 241
             throw new \Exception('Unknown number type in BC::bcNormalize().  Cannot process!');
242 242
         }
243
-        **/
243
+         **/
244 244
 
245 245
         return $a;
246 246
     }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -279,7 +279,7 @@
 block discarded – undo
279 279
 
280 280
         list($remain, $last) = array(bcdiv(bcsub($dec, $last), '16'), bcmod($dec, '16'));
281 281
 
282
-        return ($remain == 0) ? dechex($last) : $this->convertDecToHex($remain) . dechex($last);
282
+        return ($remain == 0) ? dechex($last) : $this->convertDecToHex($remain).dechex($last);
283 283
     }
284 284
 
285 285
     /**
Please login to merge, or discard this patch.
src/Sin.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -65,12 +65,12 @@
 block discarded – undo
65 65
     public function __construct($pubkey = '', $type = '02', $version = '0F')
66 66
     {
67 67
         $this->rawHashes = array(
68
-                                 'step1' => null,
69
-                                 'step2' => null,
70
-                                 'step3' => null,
71
-                                 'step4' => null,
72
-                                 'step5' => null,
73
-                                 'step6' => null,
68
+                                    'step1' => null,
69
+                                    'step2' => null,
70
+                                    'step3' => null,
71
+                                    'step4' => null,
72
+                                    'step5' => null,
73
+                                    'step6' => null,
74 74
                                 );
75 75
 
76 76
         $this->encoded = '';
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
         $this->rawHashes['step2'] = hash('ripemd160', $this->rawHashes['step1']);
131 131
 
132 132
         /* prepend the hex SINversion and hex SINtype to the hex form of the ripemd160 hash */
133
-        $this->rawHashes['step3'] = $this->SINversion . $this->SINtype . $this->rawHashes['step2'];
133
+        $this->rawHashes['step3'] = $this->SINversion.$this->SINtype.$this->rawHashes['step2'];
134 134
 
135 135
         /*
136 136
          * convert the appended hex string back to binary and double sha256 hash it leaving
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
         $this->rawHashes['step5'] = substr(bin2hex($this->rawHashes['step4']), 0, 8);
143 143
 
144 144
         /* append the first 4 bytes to the fully appended string in step 3 */
145
-        $this->rawHashes['step6'] = $this->rawHashes['step3'] . $this->rawHashes['step5'];
145
+        $this->rawHashes['step6'] = $this->rawHashes['step3'].$this->rawHashes['step5'];
146 146
 
147 147
         /* finally base58 encode it */
148 148
         $this->encoded = $this->encodeBase58($this->rawHashes['step6']);
Please login to merge, or discard this patch.
src/Wallet.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -81,12 +81,12 @@  discard block
 block discarded – undo
81 81
     public function __toString()
82 82
     {
83 83
         return json_encode(array(
84
-                                 'WIF_address'       => $this->WIF_address,
85
-                                 'private_key'       => $this->private_key,
86
-                                 'network_type'      => $this->network_type,
87
-                                 'compressed_pubkey' => $this->compressed_pubkey_format,
88
-                                 'checksum'          => $this->checksum)
89
-                                 );
84
+                                    'WIF_address'       => $this->WIF_address,
85
+                                    'private_key'       => $this->private_key,
86
+                                    'network_type'      => $this->network_type,
87
+                                    'compressed_pubkey' => $this->compressed_pubkey_format,
88
+                                    'checksum'          => $this->checksum)
89
+                                    );
90 90
     }
91 91
 
92 92
     /**
@@ -382,9 +382,9 @@  discard block
 block discarded – undo
382 382
         $decoded_key = $this->stripHexPrefix($this->decodeBase58(trim($WIF_encoded_key)));
383 383
 
384 384
         list($private_key, $checksum_provided) = array(
385
-                                                       substr($decoded_key, 0, -8), 
386
-                                                       substr($decoded_key, strlen($decoded_key) - 8)
387
-                                                       );
385
+                                                        substr($decoded_key, 0, -8), 
386
+                                                        substr($decoded_key, strlen($decoded_key) - 8)
387
+                                                        );
388 388
 
389 389
         $private_key_type = substr($private_key, 0, 2);
390 390
 
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -329,13 +329,13 @@  discard block
 block discarded – undo
329 329
         /*
330 330
          * 2. Add a 0x80 byte in front of it for mainnet addresses or 0xef for testnet addresses.
331 331
          */
332
-        $step2 = ($network == 'main') ? '80' . $step1 : 'ef' . $step1;
332
+        $step2 = ($network == 'main') ? '80'.$step1 : 'ef'.$step1;
333 333
 
334 334
         /*
335 335
          * 3. Append a 0x01 byte after it if it should be used with compressed public keys. Nothing is appended
336 336
          *    if it is used with uncompressed public keys.
337 337
          */
338
-        $step3 = ($public_key_format == 'compressed') ? $step2 . '01' : $step2;
338
+        $step3 = ($public_key_format == 'compressed') ? $step2.'01' : $step2;
339 339
 
340 340
         /*
341 341
          * 4. Perform a SHA-256 hash on the extended key.
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
         /*
356 356
          * 7. Add the four checksum bytes from step 6 at the end of the extended key from step 3.
357 357
          */
358
-        $step7 = $step3 . $this->checksum;
358
+        $step7 = $step3.$this->checksum;
359 359
 
360 360
         /*
361 361
          * 8. Convert the result from a byte string into a Base58 string using Base58Check encoding.
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
         $private_key_type = substr($private_key, 0, 2);
390 390
 
391 391
         if ($private_key_type != '80' && $private_key_type != 'ef') {
392
-            throw new \Exception('Invalid WIF encoded private key! Network type was not present in value provided. Checked ' . $private_key . ' and found ' . $private_key_type);
392
+            throw new \Exception('Invalid WIF encoded private key! Network type was not present in value provided. Checked '.$private_key.' and found '.$private_key_type);
393 393
         }
394 394
 
395 395
         $private_key           = substr($private_key, 2);
@@ -397,10 +397,10 @@  discard block
 block discarded – undo
397 397
         $private_key           = ($compressed_public_key == '01') ? substr($private_key, 0, -2) : $private_key;
398 398
 
399 399
         /* Now let's check our private key against the checksum provided. */
400
-        $new_checksum = substr(hash('sha256', hash('sha256', $this->binConv($private_key_type . $private_key . $compressed_public_key), true)), 0, 8);
400
+        $new_checksum = substr(hash('sha256', hash('sha256', $this->binConv($private_key_type.$private_key.$compressed_public_key), true)), 0, 8);
401 401
 
402 402
         if ($new_checksum != $checksum_provided) {
403
-            throw new \Exception('Invalid WIF encoded private key! Checksum is incorrect! Value encoded with key was: ' . $checksum_provided . ' but this does not match the recalculated value of: ' . $new_checksum . ' from the decoded provided value of: ' . $decoded_key);
403
+            throw new \Exception('Invalid WIF encoded private key! Checksum is incorrect! Value encoded with key was: '.$checksum_provided.' but this does not match the recalculated value of: '.$new_checksum.' from the decoded provided value of: '.$decoded_key);
404 404
         }
405 405
 
406 406
         return $private_key;
Please login to merge, or discard this patch.
src/Key.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -52,14 +52,14 @@  discard block
 block discarded – undo
52 52
         $params = $params ?? [];
53 53
 
54 54
         $this->keyInfo = array(
55
-                               'private_key_hex'       => $this->keyValueCheck($params['private_key_hex']       ?? null),
56
-                               'private_key_dec'       => $this->keyValueCheck($params['private_key_dec']       ?? null),
57
-                               'public_key'            => $this->keyValueCheck($params['public_key']            ?? null),
58
-                               'public_key_compressed' => $this->keyValueCheck($params['public_key_compressed'] ?? null),
59
-                               'public_key_x'          => $this->keyValueCheck($params['public_key_x']          ?? null),
60
-                               'public_key_y'          => $this->keyValueCheck($params['public_key_y']          ?? null),
61
-                               'generation_time'       => '',
62
-                               );
55
+                                'private_key_hex'       => $this->keyValueCheck($params['private_key_hex']       ?? null),
56
+                                'private_key_dec'       => $this->keyValueCheck($params['private_key_dec']       ?? null),
57
+                                'public_key'            => $this->keyValueCheck($params['public_key']            ?? null),
58
+                                'public_key_compressed' => $this->keyValueCheck($params['public_key_compressed'] ?? null),
59
+                                'public_key_x'          => $this->keyValueCheck($params['public_key_x']          ?? null),
60
+                                'public_key_y'          => $this->keyValueCheck($params['public_key_y']          ?? null),
61
+                                'generation_time'       => '',
62
+                                );
63 63
     }
64 64
 
65 65
     /**
@@ -120,13 +120,13 @@  discard block
 block discarded – undo
120 120
         $comp_prefix = ($this->Modulo($point['R']['y'], '2') == '1') ? '03' : '02';
121 121
 
122 122
         $this->keyInfo = array(
123
-                               'private_key_hex'       => $this->encodeHex($point['random_number']),
124
-                               'private_key_dec'       => $point['random_number'],
125
-                               'public_key'            => '04' . $point['Rx_hex'] . $point['Ry_hex'],
126
-                               'public_key_compressed' => $comp_prefix . $point['Rx_hex'],
127
-                               'public_key_x'          => $point['Rx_hex'],
128
-                               'public_key_y'          => $point['Ry_hex'],
129
-                              );
123
+                                'private_key_hex'       => $this->encodeHex($point['random_number']),
124
+                                'private_key_dec'       => $point['random_number'],
125
+                                'public_key'            => '04' . $point['Rx_hex'] . $point['Ry_hex'],
126
+                                'public_key_compressed' => $comp_prefix . $point['Rx_hex'],
127
+                                'public_key_x'          => $point['Rx_hex'],
128
+                                'public_key_y'          => $point['Ry_hex'],
129
+                                );
130 130
 
131 131
         return $this->keyInfo;
132 132
     }
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -52,12 +52,12 @@  discard block
 block discarded – undo
52 52
         $params = $params ?? [];
53 53
 
54 54
         $this->keyInfo = array(
55
-                               'private_key_hex'       => $this->keyValueCheck($params['private_key_hex']       ?? null),
56
-                               'private_key_dec'       => $this->keyValueCheck($params['private_key_dec']       ?? null),
57
-                               'public_key'            => $this->keyValueCheck($params['public_key']            ?? null),
55
+                               'private_key_hex'       => $this->keyValueCheck($params['private_key_hex'] ?? null),
56
+                               'private_key_dec'       => $this->keyValueCheck($params['private_key_dec'] ?? null),
57
+                               'public_key'            => $this->keyValueCheck($params['public_key'] ?? null),
58 58
                                'public_key_compressed' => $this->keyValueCheck($params['public_key_compressed'] ?? null),
59
-                               'public_key_x'          => $this->keyValueCheck($params['public_key_x']          ?? null),
60
-                               'public_key_y'          => $this->keyValueCheck($params['public_key_y']          ?? null),
59
+                               'public_key_x'          => $this->keyValueCheck($params['public_key_x'] ?? null),
60
+                               'public_key_y'          => $this->keyValueCheck($params['public_key_y'] ?? null),
61 61
                                'generation_time'       => '',
62 62
                                );
63 63
     }
@@ -122,8 +122,8 @@  discard block
 block discarded – undo
122 122
         $this->keyInfo = array(
123 123
                                'private_key_hex'       => $this->encodeHex($point['random_number']),
124 124
                                'private_key_dec'       => $point['random_number'],
125
-                               'public_key'            => '04' . $point['Rx_hex'] . $point['Ry_hex'],
126
-                               'public_key_compressed' => $comp_prefix . $point['Rx_hex'],
125
+                               'public_key'            => '04'.$point['Rx_hex'].$point['Ry_hex'],
126
+                               'public_key_compressed' => $comp_prefix.$point['Rx_hex'],
127 127
                                'public_key_x'          => $point['Rx_hex'],
128 128
                                'public_key_y'          => $point['Ry_hex'],
129 129
                               );
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
         $pointX = substr($pubkey, 2);
161 161
         $pointY = substr($this->calcYfromX($pointX, $prefix), 2);
162 162
 
163
-        $parsedValue = $this->prepAndClean($pointX . $pointY);
163
+        $parsedValue = $this->prepAndClean($pointX.$pointY);
164 164
 
165 165
         return ($returnHex === false) ? $parsedValue : $this->encodeHex($parsedValue);
166 166
     }
Please login to merge, or discard this patch.
src/Math.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
             $return  = strrev($this->encodeValue($hex, '58'));
321 321
 
322 322
             for ($i = 0; $i < strlen($orighex) && substr($orighex, $i, 2) == '00'; $i += 2) {
323
-                $return = '1' . $return;
323
+                $return = '1'.$return;
324 324
             }
325 325
 
326 326
             return $return;
@@ -356,10 +356,10 @@  discard block
 block discarded – undo
356 356
             $return = $this->encodeHex($return);
357 357
 
358 358
             for ($i = 0; $i < strlen($origbase58) && $origbase58[$i] == '1'; $i++) {
359
-                $return = '00' . $return;
359
+                $return = '00'.$return;
360 360
             }
361 361
 
362
-            return (strlen($return) % 2 != 0) ? '0' . $return : $return;
362
+            return (strlen($return) % 2 != 0) ? '0'.$return : $return;
363 363
 
364 364
         } catch (\Exception $e) {
365 365
             // TODO: Need to do something useful here instead of re-throwing the exception.
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
         foreach ($params as $key => $value) {
402 402
             if ($this->numberCheck($value) === false) {
403 403
                 $caller = debug_backtrace();
404
-                throw new \Exception('Empty or invalid parameters passed to ' . $caller[count($caller) - 1]['function'] . ' function.');
404
+                throw new \Exception('Empty or invalid parameters passed to '.$caller[count($caller) - 1]['function'].' function.');
405 405
             }
406 406
         }
407 407
     }
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
                 $qq  = $this->math->div($val, $base);
429 429
                 $rem = $this->math->mod($val, $base);
430 430
                 $val = $qq;
431
-                $new = $new . $digits[$rem];
431
+                $new = $new.$digits[$rem];
432 432
             }
433 433
 
434 434
             return $new;
Please login to merge, or discard this patch.
src/Number.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         $secure_random_number = '';
184 184
 
185 185
         while (strlen($secure_random_number) < 78) {
186
-            $secure_random_number = $secure_random_number . hexdec(bin2hex(openssl_random_pseudo_bytes(4, $cstrong)));
186
+            $secure_random_number = $secure_random_number.hexdec(bin2hex(openssl_random_pseudo_bytes(4, $cstrong)));
187 187
         }
188 188
 
189 189
         if ($secure_random_number === false || $cstrong === false) {
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
      */
217 217
     private function addHexPrefix($hex)
218 218
     {
219
-        return (substr($hex, 0, 2) != '0x') ? '0x' . $hex : $hex;
219
+        return (substr($hex, 0, 2) != '0x') ? '0x'.$hex : $hex;
220 220
     }
221 221
 
222 222
     /**
Please login to merge, or discard this patch.