From eab16c2ed71ced2362e2c26b160b859d49b6db99 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Thu, 31 Oct 2019 12:45:46 +0100 Subject: [PATCH] Clean up --- src/danog/MadelineProto/Tools.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/danog/MadelineProto/Tools.php b/src/danog/MadelineProto/Tools.php index c5de5fd7..d742a058 100644 --- a/src/danog/MadelineProto/Tools.php +++ b/src/danog/MadelineProto/Tools.php @@ -717,7 +717,7 @@ trait Tools * * @return string */ - public function base64urlDecode(string $data): string + public static function base64urlDecode(string $data): string { return \base64_decode(\str_pad(\strtr($data, '-_', '+/'), \strlen($data) % 4, '=', STR_PAD_RIGHT)); } @@ -728,7 +728,7 @@ trait Tools * * @return string */ - public function base64urlEncode(string $data): string + public static function base64urlEncode(string $data): string { return \rtrim(\strtr(\base64_encode($data), '+/', '-_'), '='); } @@ -740,7 +740,7 @@ trait Tools * * @return string */ - public function rleDecode(string $string): string + public static function rleDecode(string $string): string { $new = ''; $last = ''; @@ -766,7 +766,7 @@ trait Tools * * @return string */ - public function rleEncode(string $string): string + public static function rleEncode(string $string): string { $new = ''; $count = 0; @@ -805,7 +805,7 @@ trait Tools * * @return void */ - public function markdownEscape(string $hwat): string + public static function markdownEscape(string $hwat): string { return \str_replace('_', '\\_', $hwat); } @@ -815,7 +815,7 @@ trait Tools * * @return boolean */ - public function isAltervista(): bool + public static function isAltervista(): bool { return Magic::$altervista; }