From 322ec6ce09050f45e99f4fd761e9dccca8241c6f Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sun, 1 Jan 2017 12:32:20 +0000 Subject: [PATCH] Apply fixes from StyleCI --- id.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/id.php b/id.php index 317414d5b..93ed1e3a9 100644 --- a/id.php +++ b/id.php @@ -12,9 +12,10 @@ If not, see . require 'vendor/autoload.php'; -$id = "AgADBAADcKoxG4_aCgYKET2oLMua7pxRaRkABKoeLWY9bpazGdcCAAEC"; +$id = 'AgADBAADcKoxG4_aCgYKET2oLMua7pxRaRkABKoeLWY9bpazGdcCAAEC'; -function foreach_offset_length($string, $callback) { +function foreach_offset_length($string, $callback) +{ $strlen = strlen($string); for ($offset = 0; $offset < strlen($string); $offset++) { for ($length = $strlen - $offset; $length > 0; $length--) { @@ -27,10 +28,11 @@ function foreach_offset_length($string, $callback) { $base256 = base64url_decode($id); foreach_offset_length($base256, function ($s) { - $int = (string)(new \phpseclib\Math\BigInteger(strrev($s), 256)); + $int = (string) (new \phpseclib\Math\BigInteger(strrev($s), 256)); echo $int.PHP_EOL; }); -function base64url_decode($data) { - return base64_decode(str_pad(strtr($data, '-_', '+/'), strlen($data) % 4, '=', STR_PAD_RIGHT)); +function base64url_decode($data) +{ + return base64_decode(str_pad(strtr($data, '-_', '+/'), strlen($data) % 4, '=', STR_PAD_RIGHT)); }