mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-09 05:38:39 +00:00
Don't use EOL
This commit is contained in:
parent
a47d784f66
commit
566d8e8c27
|
|
@ -38,14 +38,14 @@ class ArrayParser
|
||||||
*/
|
*/
|
||||||
public static function serializeArray(array $arr, int $depth = 1) : string
|
public static function serializeArray(array $arr, int $depth = 1) : string
|
||||||
{
|
{
|
||||||
$stringify = '[' . PHP_EOL;
|
$stringify = '[' . "\n";
|
||||||
|
|
||||||
foreach ($arr as $key => $val) {
|
foreach ($arr as $key => $val) {
|
||||||
if (is_string($key)) {
|
if (is_string($key)) {
|
||||||
$key = '\'' . str_replace('\'', '\\\'', $key) . '\'';
|
$key = '\'' . str_replace('\'', '\\\'', $key) . '\'';
|
||||||
}
|
}
|
||||||
|
|
||||||
$stringify .= str_repeat(' ', $depth * 4) . $key . ' => ' . self::parseVariable($val, $depth + 1) . ',' . PHP_EOL;
|
$stringify .= str_repeat(' ', $depth * 4) . $key . ' => ' . self::parseVariable($val, $depth + 1) . ',' . "\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user