소스 검색

Wording tweaks

Jordi Boggiano 7 년 전
부모
커밋
802849d52c
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/Composer/Json/JsonManipulator.php

+ 2 - 2
src/Composer/Json/JsonManipulator.php

@@ -430,8 +430,8 @@ class JsonManipulator
                 return false;
             }
 
-            //check if we do not left a coma alone on previous line if it was the last line
-            if(preg_match('#,\s*$#', $matches['start']) && preg_match('#^\}$#', $matches['end'])) {
+            // check that we are not leaving a dangling comma on the previous line if the last line was removed
+            if (preg_match('#,\s*$#', $matches['start']) && preg_match('#^\}$#', $matches['end'])) {
                 $matches['start'] = rtrim(preg_replace('#,(\s*)$#', '$1', $matches['start']), $this->indent);
             }