Update to laravel 7

This commit is contained in:
KodeStar
2022-03-10 11:54:29 +00:00
parent 61a5a1a8b0
commit f9a19fce91
7170 changed files with 274189 additions and 283773 deletions

View File

@@ -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;