mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-04 05:59:55 +09:00
Update to laravel 7
This commit is contained in:
10
vendor/symfony/mime/Encoder/QpEncoder.php
vendored
10
vendor/symfony/mime/Encoder/QpEncoder.php
vendored
@@ -15,15 +15,13 @@ use Symfony\Component\Mime\CharacterStream;
|
||||
|
||||
/**
|
||||
* @author Chris Corbyn
|
||||
*
|
||||
* @experimental in 4.3
|
||||
*/
|
||||
class QpEncoder implements EncoderInterface
|
||||
{
|
||||
/**
|
||||
* Pre-computed QP for HUGE optimization.
|
||||
*/
|
||||
private static $qpMap = [
|
||||
private const QP_MAP = [
|
||||
0 => '=00', 1 => '=01', 2 => '=02', 3 => '=03', 4 => '=04',
|
||||
5 => '=05', 6 => '=06', 7 => '=07', 8 => '=08', 9 => '=09',
|
||||
10 => '=0A', 11 => '=0B', 12 => '=0C', 13 => '=0D', 14 => '=0E',
|
||||
@@ -91,7 +89,7 @@ class QpEncoder implements EncoderInterface
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$id = \get_class($this);
|
||||
$id = static::class;
|
||||
if (!isset(self::$safeMapShare[$id])) {
|
||||
$this->initSafeMap();
|
||||
self::$safeMapShare[$id] = $this->safeMap;
|
||||
@@ -172,7 +170,7 @@ class QpEncoder implements EncoderInterface
|
||||
$ret .= $this->safeMap[$b];
|
||||
++$size;
|
||||
} else {
|
||||
$ret .= self::$qpMap[$b];
|
||||
$ret .= self::QP_MAP[$b];
|
||||
$size += 3;
|
||||
}
|
||||
}
|
||||
@@ -189,7 +187,7 @@ class QpEncoder implements EncoderInterface
|
||||
switch ($end = \ord(substr($string, -1))) {
|
||||
case 0x09:
|
||||
case 0x20:
|
||||
$string = substr_replace($string, self::$qpMap[$end], -1);
|
||||
$string = substr_replace($string, self::QP_MAP[$end], -1);
|
||||
}
|
||||
|
||||
return $string;
|
||||
|
||||
Reference in New Issue
Block a user