eee
This commit is contained in:
@@ -151,7 +151,7 @@ class Str
|
|||||||
{
|
{
|
||||||
$res = [];
|
$res = [];
|
||||||
$add = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
|
$add = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
|
||||||
$len = strlen($key) < 0 ? 1 : (strlen($key) + 5 > strlen($add) ? strlen($add) - 5 : strlen($key));
|
$len = strlen($key) + 5 > strlen($add) ? strlen($add) - 5 : strlen($key);
|
||||||
if ($number < 1) $number = 10;
|
if ($number < 1) $number = 10;
|
||||||
$array = str_split($str);
|
$array = str_split($str);
|
||||||
asort($array);
|
asort($array);
|
||||||
@@ -227,8 +227,8 @@ class Str
|
|||||||
*/
|
*/
|
||||||
public static function clear(string $string): array|string|null
|
public static function clear(string $string): array|string|null
|
||||||
{
|
{
|
||||||
$char = '。、!?:;﹑•"…‘’“”〝〞∕¦‖— 〈〉﹞﹝「」‹›〖〗】【»«』『〕〔》《﹐¸﹕︰﹔!¡?¿﹖﹌﹏﹋'´ˊˋ―﹫︳︴¯_ ̄﹢﹦﹤‐˜﹟﹩﹠﹪﹡﹨﹍﹉﹎﹊ˇ︵︶︷︸︹︿﹀︺︽︾ˉ﹁﹂﹃﹄︻︼()';
|
$char = '。、!?:;﹑•"…‘’“”〝〞∕¦‖— 〈〉﹞﹝「」‹›〖〗】【»«』『〕〔》《﹐¸﹕︰﹔¡¿﹖﹌﹏﹋'´ˊˋ―﹫︳︴¯_ ̄﹢﹦﹤‐˜﹟﹩﹠﹪﹡﹨﹍﹉﹎﹊ˇ︵︶︷︸︹︿﹀︺︽︾ˉ﹁﹂﹃﹄︻︼()';
|
||||||
return preg_replace(["/[[:punct:]]/i", '/[' . $char . ']/u', '/[ ]{2,}/'], '', $string);
|
return preg_replace(["/[[:punct:]]/i", '/[' . $char . ']/u', '/ {2,}/'], '', $string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ class ErrorHandler extends Component implements ErrorInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return void
|
* @return void
|
||||||
* @throws ReflectionException
|
* @throws
|
||||||
* @throws
|
* @throws
|
||||||
*/
|
*/
|
||||||
public function shutdown(): void
|
public function shutdown(): void
|
||||||
@@ -100,7 +100,9 @@ class ErrorHandler extends Component implements ErrorInterface
|
|||||||
if (empty($lastError) || $lastError['type'] !== E_ERROR) {
|
if (empty($lastError) || $lastError['type'] !== E_ERROR) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
trigger_print_error($lastError['message']);
|
|
||||||
|
$this->getLogger()->failure($lastError['message'] . PHP_EOL);
|
||||||
|
|
||||||
event(new OnSystemError());
|
event(new OnSystemError());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,7 +116,7 @@ class ErrorHandler extends Component implements ErrorInterface
|
|||||||
{
|
{
|
||||||
$this->category = 'exception';
|
$this->category = 'exception';
|
||||||
|
|
||||||
trigger_print_error($exception);
|
$this->getLogger()->failure($exception);
|
||||||
|
|
||||||
event(new OnSystemError());
|
event(new OnSystemError());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user