Skip to content

Commit

Permalink
feature/gz-encode-and-decode
Browse files Browse the repository at this point in the history
  • Loading branch information
Raul Mauricio Uñate Castro committed Jul 8, 2024
1 parent 85c9ead commit 573e3be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Support/Str.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,10 @@ public static function convertCase(string $string, int $mode = MB_CASE_FOLD, ?st
* Compresses a string using gzip compression.
*
* @param string $string The string to compress.
* @param int $mode Compression level (1 to 9, defaults to 5).
* @param int $level Compression level (1 to 9, defaults to 5).
* @return string|false The compressed string, or false on failure.
*/
public static function compress(string $string, int $mode = 5)
public static function compress(string $string, int $level = 5)
{
if ($level < 1 || $level > 9) {
throw new \OutOfBoundsException('Compression level must be between 1 and 9.');
Expand Down
6 changes: 3 additions & 3 deletions src/Illuminate/Support/Stringable.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,12 @@ public function convertCase(int $mode = MB_CASE_FOLD, ?string $encoding = 'UTF-8
/**
* Compresses a string using gzip compression.
*
* @param int $mode Compression level (1 to 9, defaults to 5).
* @param int $level Compression level (1 to 9, defaults to 5).
* @return string|false The compressed string, or false on failure.
*/
public function compress(int $mode = 5)
public function compress(int $level = 5)
{
return new static(Str::compress($this->value, $mode));
return new static(Str::compress($this->value, $level));
}

/**
Expand Down

0 comments on commit 573e3be

Please sign in to comment.