From c0e84dcd501d12d0b322b2595f2c2424d6489b0e Mon Sep 17 00:00:00 2001 From: Brunon Blok <43315279+brun0ne@users.noreply.github.com> Date: Sun, 9 Apr 2023 19:06:59 +0000 Subject: [PATCH] change comments --- src/core/operations/PHPSerialize.mjs | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/src/core/operations/PHPSerialize.mjs b/src/core/operations/PHPSerialize.mjs index 221af327..00fb1380 100644 --- a/src/core/operations/PHPSerialize.mjs +++ b/src/core/operations/PHPSerialize.mjs @@ -61,9 +61,7 @@ class PHPSerialize extends Operation { if (typeof content === "boolean") { return `${basicTypes.boolean}:${content ? 1 : 0}`; } - /** - * Numbers - */ + /* Numbers */ if (typeof content === "number") { if (isInteger(content)) { return `${basicTypes.integer}:${content.toString()}`; @@ -71,9 +69,7 @@ class PHPSerialize extends Operation { return `${basicTypes.float}:${content.toString()}`; } } - /** - * Strings - */ + /* Strings */ if (typeof content === "string") return `${basicTypes.string}:${content.length}:"${content}"`; @@ -87,22 +83,16 @@ class PHPSerialize extends Operation { * @returns {string} */ function serialize(object) { - /** - * Null - */ + /* Null */ if (object == null) { return `N;`; } if (typeof object !== "object") { - /** - * Basic types - */ + /* Basic types */ return `${serializeBasicTypes(object)};`; } else if (object instanceof Array) { - /** - * Arrays - */ + /* Arrays */ const serializedElements = []; for (let i = 0; i < object.length; i++) {