@@ -340,7 +340,7 @@ private function addNewKeyToYaml($key, $value)
340
340
// no previous blank line is needed, but we DO need to add a blank
341
341
// line after, because the remainder of the content expects the
342
342
// current position the start at the beginning of a new line
343
- $ newYamlValue = $ newYamlValue . "\n" ;
343
+ $ newYamlValue .= "\n" ;
344
344
} else {
345
345
if ($ this ->isCurrentArrayMultiline ()) {
346
346
// because we're inside a multi-line array, put this item
@@ -351,7 +351,7 @@ private function addNewKeyToYaml($key, $value)
351
351
if ($ firstItemInArray ) {
352
352
// avoid the starting "," if first item in array
353
353
// but, DO add an ending ","
354
- $ newYamlValue = $ newYamlValue . ', ' ;
354
+ $ newYamlValue .= ', ' ;
355
355
} else {
356
356
$ newYamlValue = ', ' .$ newYamlValue ;
357
357
}
@@ -363,7 +363,7 @@ private function addNewKeyToYaml($key, $value)
363
363
.substr ($ this ->contents , $ this ->currentPosition + $ extraOffset );
364
364
// manually bump the position: we didn't really move forward
365
365
// any in the existing string, we just added our own new content
366
- $ this ->currentPosition = $ this -> currentPosition + \strlen ($ newYamlValue );
366
+ $ this ->currentPosition += \strlen ($ newYamlValue );
367
367
368
368
if (0 === $ this ->depth ) {
369
369
$ newData = $ this ->currentData ;
@@ -438,7 +438,7 @@ private function removeKeyFromYaml($key, $currentVal)
438
438
// instead of passing the new +2 position below, we do it here
439
439
// manually. This is because this it's not a real position move,
440
440
// we manually (above) added some new chars that didn't exist before
441
- $ this ->currentPosition = $ this -> currentPosition + $ newPositionBump ;
441
+ $ this ->currentPosition += $ newPositionBump ;
442
442
443
443
$ this ->updateContents (
444
444
$ newContents ,
@@ -1171,7 +1171,7 @@ private function isPositionAtBeginningOfArray(): bool
1171
1171
1172
1172
private function manuallyIncrementIndentation ()
1173
1173
{
1174
- $ this ->indentationForDepths [$ this ->depth ] = $ this -> indentationForDepths [ $ this -> depth ] + $ this ->getPreferredIndentationSize ();
1174
+ $ this ->indentationForDepths [$ this ->depth ] += $ this ->getPreferredIndentationSize ();
1175
1175
}
1176
1176
1177
1177
private function isEOF (int $ position = null )
0 commit comments