mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-11 06:28:40 +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
|
* @link http://orange-management.com
|
||||||
* @since 1.0.0
|
* @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);
|
$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
|
public static function mb_trim(string $string, string $charlist = ' ') : string
|
||||||
{
|
{
|
||||||
if (is_null($charlist)) {
|
if ($charlist === ' ') {
|
||||||
return trim($string);
|
return trim($string);
|
||||||
} else {
|
} else {
|
||||||
$charlist = str_replace('/', '\/', preg_quote($charlist));
|
$charlist = str_replace('/', '\/', preg_quote($charlist));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user