@@ -340,7 +340,7 @@ private function addNewKeyToYaml($key, $value)
340340 // no previous blank line is needed, but we DO need to add a blank
341341 // line after, because the remainder of the content expects the
342342 // current position the start at the beginning of a new line
343- $ newYamlValue = $ newYamlValue . "\n" ;
343+ $ newYamlValue .= "\n" ;
344344 } else {
345345 if ($ this ->isCurrentArrayMultiline ()) {
346346 // because we're inside a multi-line array, put this item
@@ -351,7 +351,7 @@ private function addNewKeyToYaml($key, $value)
351351 if ($ firstItemInArray ) {
352352 // avoid the starting "," if first item in array
353353 // but, DO add an ending ","
354- $ newYamlValue = $ newYamlValue . ', ' ;
354+ $ newYamlValue .= ', ' ;
355355 } else {
356356 $ newYamlValue = ', ' .$ newYamlValue ;
357357 }
@@ -363,7 +363,7 @@ private function addNewKeyToYaml($key, $value)
363363 .substr ($ this ->contents , $ this ->currentPosition + $ extraOffset );
364364 // manually bump the position: we didn't really move forward
365365 // any in the existing string, we just added our own new content
366- $ this ->currentPosition = $ this -> currentPosition + \strlen ($ newYamlValue );
366+ $ this ->currentPosition += \strlen ($ newYamlValue );
367367
368368 if (0 === $ this ->depth ) {
369369 $ newData = $ this ->currentData ;
@@ -438,7 +438,7 @@ private function removeKeyFromYaml($key, $currentVal)
438438 // instead of passing the new +2 position below, we do it here
439439 // manually. This is because this it's not a real position move,
440440 // we manually (above) added some new chars that didn't exist before
441- $ this ->currentPosition = $ this -> currentPosition + $ newPositionBump ;
441+ $ this ->currentPosition += $ newPositionBump ;
442442
443443 $ this ->updateContents (
444444 $ newContents ,
@@ -1171,7 +1171,7 @@ private function isPositionAtBeginningOfArray(): bool
11711171
11721172 private function manuallyIncrementIndentation ()
11731173 {
1174- $ this ->indentationForDepths [$ this ->depth ] = $ this -> indentationForDepths [ $ this -> depth ] + $ this ->getPreferredIndentationSize ();
1174+ $ this ->indentationForDepths [$ this ->depth ] += $ this ->getPreferredIndentationSize ();
11751175 }
11761176
11771177 private function isEOF (int $ position = null )
0 commit comments