File tree Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -61,19 +61,15 @@ class PHPSerialize extends Operation {
6161 if ( typeof content === "boolean" ) {
6262 return `${ basicTypes . boolean } :${ content ? 1 : 0 } ` ;
6363 }
64- /**
65- * Numbers
66- */
64+ /* Numbers */
6765 if ( typeof content === "number" ) {
6866 if ( isInteger ( content ) ) {
6967 return `${ basicTypes . integer } :${ content . toString ( ) } ` ;
7068 } else {
7169 return `${ basicTypes . float } :${ content . toString ( ) } ` ;
7270 }
7371 }
74- /**
75- * Strings
76- */
72+ /* Strings */
7773 if ( typeof content === "string" )
7874 return `${ basicTypes . string } :${ content . length } :"${ content } "` ;
7975
@@ -87,22 +83,16 @@ class PHPSerialize extends Operation {
8783 * @returns {string }
8884 */
8985 function serialize ( object ) {
90- /**
91- * Null
92- */
86+ /* Null */
9387 if ( object == null ) {
9488 return `N;` ;
9589 }
9690
9791 if ( typeof object !== "object" ) {
98- /**
99- * Basic types
100- */
92+ /* Basic types */
10193 return `${ serializeBasicTypes ( object ) } ;` ;
10294 } else if ( object instanceof Array ) {
103- /**
104- * Arrays
105- */
95+ /* Arrays */
10696 const serializedElements = [ ] ;
10797
10898 for ( let i = 0 ; i < object . length ; i ++ ) {
You can’t perform that action at this time.
0 commit comments