mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-20 05:18:42 +00:00
Minor fixes during tests
This commit is contained in:
parent
886d2beff5
commit
adc335d0e6
|
|
@ -24,7 +24,7 @@ namespace phpOMS\Utils;
|
|||
* @link http://orange-management.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class JsonBuilder implements \Serializable
|
||||
class JsonBuilder implements \Serializable, \JsonSerializable
|
||||
{
|
||||
|
||||
/**
|
||||
|
|
@ -110,4 +110,9 @@ class JsonBuilder implements \Serializable
|
|||
{
|
||||
$this->json = json_decode($serialized);
|
||||
}
|
||||
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return $this->json();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ class StringUtils
|
|||
*/
|
||||
public static function mb_trim(string $string, string $charlist = ' ') : string
|
||||
{
|
||||
if (is_null($charlist)) {
|
||||
if ($charlist === ' ') {
|
||||
return trim($string);
|
||||
} else {
|
||||
$charlist = str_replace('/', '\/', preg_quote($charlist));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user