diff options
author | VirtualTam <virtualtam@flibidi.net> | 2018-10-13 00:19:03 +0200 |
---|---|---|
committer | VirtualTam <virtualtam@flibidi.net> | 2018-12-02 22:39:16 +0100 |
commit | f211e417bf637b8a83988175c29ee072c69f7642 (patch) | |
tree | c33378b38ff1bd16e90934b5c60467a7e0395f53 /application/Base64Url.php | |
parent | 04ec8fedd91642d4c0fc96258868086b8a51c899 (diff) | |
download | Shaarli-f211e417bf637b8a83988175c29ee072c69f7642.tar.gz Shaarli-f211e417bf637b8a83988175c29ee072c69f7642.tar.zst Shaarli-f211e417bf637b8a83988175c29ee072c69f7642.zip |
lint: apply phpcbf to application/
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'application/Base64Url.php')
-rw-r--r-- | application/Base64Url.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/application/Base64Url.php b/application/Base64Url.php index 61590e43..54d0fcd5 100644 --- a/application/Base64Url.php +++ b/application/Base64Url.php | |||
@@ -2,7 +2,6 @@ | |||
2 | 2 | ||
3 | namespace Shaarli; | 3 | namespace Shaarli; |
4 | 4 | ||
5 | |||
6 | /** | 5 | /** |
7 | * URL-safe Base64 operations | 6 | * URL-safe Base64 operations |
8 | * | 7 | * |
@@ -17,7 +16,8 @@ class Base64Url | |||
17 | * | 16 | * |
18 | * @return string Base64Url-encoded data | 17 | * @return string Base64Url-encoded data |
19 | */ | 18 | */ |
20 | public static function encode($data) { | 19 | public static function encode($data) |
20 | { | ||
21 | return rtrim(strtr(base64_encode($data), '+/', '-_'), '='); | 21 | return rtrim(strtr(base64_encode($data), '+/', '-_'), '='); |
22 | } | 22 | } |
23 | 23 | ||
@@ -28,7 +28,8 @@ class Base64Url | |||
28 | * | 28 | * |
29 | * @return string Decoded data | 29 | * @return string Decoded data |
30 | */ | 30 | */ |
31 | public static function decode($data) { | 31 | public static function decode($data) |
32 | { | ||
32 | return base64_decode(str_pad(strtr($data, '-_', '+/'), strlen($data) % 4, '=', STR_PAD_RIGHT)); | 33 | return base64_decode(str_pad(strtr($data, '-_', '+/'), strlen($data) % 4, '=', STR_PAD_RIGHT)); |
33 | } | 34 | } |
34 | } | 35 | } |