@@ -245,8 +245,8 @@ |
||
| 245 | 245 | $N = 2; |
| 246 | 246 | $limit = 3; |
| 247 | 247 | $V = [ |
| 248 | - [0,0,1,1,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], |
|
| 249 | - [0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], |
|
| 248 | + [0, 0, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], |
|
| 249 | + [0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], |
|
| 250 | 250 | ]; |
| 251 | 251 | |
| 252 | 252 | $refMethod = new \ReflectionMethod($lcs, 'findMostProgress'); |
@@ -20,8 +20,8 @@ discard block |
||
| 20 | 20 | { |
| 21 | 21 | public function testLineAdditions(): void |
| 22 | 22 | { |
| 23 | - $s1 = 'abc' . PHP_EOL . 'def' . PHP_EOL . 'xyz'; |
|
| 24 | - $s2 = 'abc' . PHP_EOL . 'def' . PHP_EOL . '123' . PHP_EOL . 'xyz'; |
|
| 23 | + $s1 = 'abc'.PHP_EOL.'def'.PHP_EOL.'xyz'; |
|
| 24 | + $s2 = 'abc'.PHP_EOL.'def'.PHP_EOL.'123'.PHP_EOL.'xyz'; |
|
| 25 | 25 | |
| 26 | 26 | $l1 = TextLineLCS::getTextLines($s1); |
| 27 | 27 | $l2 = TextLineLCS::getTextLines($s2); |
@@ -41,8 +41,8 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | public function testLineDeletion(): void |
| 43 | 43 | { |
| 44 | - $s1 = 'abc' . PHP_EOL . 'def' . PHP_EOL . '123' . PHP_EOL . 'xyz'; |
|
| 45 | - $s2 = 'abc' . PHP_EOL . 'def' . PHP_EOL . 'xyz'; |
|
| 44 | + $s1 = 'abc'.PHP_EOL.'def'.PHP_EOL.'123'.PHP_EOL.'xyz'; |
|
| 45 | + $s2 = 'abc'.PHP_EOL.'def'.PHP_EOL.'xyz'; |
|
| 46 | 46 | |
| 47 | 47 | $l1 = TextLineLCS::getTextLines($s1); |
| 48 | 48 | $l2 = TextLineLCS::getTextLines($s2); |
@@ -68,8 +68,8 @@ discard block |
||
| 68 | 68 | |
| 69 | 69 | public function testLineAppendEnd(): void |
| 70 | 70 | { |
| 71 | - $s1 = 'abc' . PHP_EOL . 'def'; |
|
| 72 | - $s2 = 'abc' . PHP_EOL . 'def' . PHP_EOL . '123'; |
|
| 71 | + $s1 = 'abc'.PHP_EOL.'def'; |
|
| 72 | + $s2 = 'abc'.PHP_EOL.'def'.PHP_EOL.'123'; |
|
| 73 | 73 | |
| 74 | 74 | $l1 = TextLineLCS::getTextLines($s1); |
| 75 | 75 | $l2 = TextLineLCS::getTextLines($s2); |
@@ -94,8 +94,8 @@ discard block |
||
| 94 | 94 | |
| 95 | 95 | public function testLineDeleteEnd(): void |
| 96 | 96 | { |
| 97 | - $s1 = 'abc' . PHP_EOL . 'def' . PHP_EOL . '123'; |
|
| 98 | - $s2 = 'abc' . PHP_EOL . 'def'; |
|
| 97 | + $s1 = 'abc'.PHP_EOL.'def'.PHP_EOL.'123'; |
|
| 98 | + $s2 = 'abc'.PHP_EOL.'def'; |
|
| 99 | 99 | |
| 100 | 100 | $l1 = TextLineLCS::getTextLines($s1); |
| 101 | 101 | $l2 = TextLineLCS::getTextLines($s2); |
@@ -120,8 +120,8 @@ discard block |
||
| 120 | 120 | |
| 121 | 121 | public function testLineAppendStart(): void |
| 122 | 122 | { |
| 123 | - $s1 = 'abc' . PHP_EOL . 'def'; |
|
| 124 | - $s2 = '123' . PHP_EOL . 'abc' . PHP_EOL . 'def'; |
|
| 123 | + $s1 = 'abc'.PHP_EOL.'def'; |
|
| 124 | + $s2 = '123'.PHP_EOL.'abc'.PHP_EOL.'def'; |
|
| 125 | 125 | |
| 126 | 126 | $l1 = TextLineLCS::getTextLines($s1); |
| 127 | 127 | $l2 = TextLineLCS::getTextLines($s2); |
@@ -146,8 +146,8 @@ discard block |
||
| 146 | 146 | |
| 147 | 147 | public function testLineDeleteStart(): void |
| 148 | 148 | { |
| 149 | - $s1 = '123' . PHP_EOL . 'abc' . PHP_EOL . 'def'; |
|
| 150 | - $s2 = 'abc' . PHP_EOL . 'def'; |
|
| 149 | + $s1 = '123'.PHP_EOL.'abc'.PHP_EOL.'def'; |
|
| 150 | + $s2 = 'abc'.PHP_EOL.'def'; |
|
| 151 | 151 | |
| 152 | 152 | $l1 = TextLineLCS::getTextLines($s1); |
| 153 | 153 | $l2 = TextLineLCS::getTextLines($s2); |
@@ -181,9 +181,9 @@ discard block |
||
| 181 | 181 | |
| 182 | 182 | public function testLong(): void |
| 183 | 183 | { |
| 184 | - $s1 = str_repeat('a' . PHP_EOL, 100); |
|
| 184 | + $s1 = str_repeat('a'.PHP_EOL, 100); |
|
| 185 | 185 | $l1 = TextLineLCS::getTextLines($s1); |
| 186 | - $l2 = TextLineLCS::getTextLines($s1 . 'test'); |
|
| 186 | + $l2 = TextLineLCS::getTextLines($s1.'test'); |
|
| 187 | 187 | $lcs = new TextLineLCS($l1, $l2); |
| 188 | 188 | $lcs->longestCommonSubsequence(); |
| 189 | 189 | |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | |
| 193 | 193 | public function testOneDiff(): void |
| 194 | 194 | { |
| 195 | - $s1 = str_repeat('a' . PHP_EOL, 100); |
|
| 195 | + $s1 = str_repeat('a'.PHP_EOL, 100); |
|
| 196 | 196 | $l1 = TextLineLCS::getTextLines($s1); |
| 197 | 197 | $l2 = TextLineLCS::getTextLines($s1); |
| 198 | 198 | $l2[50] = new TextLine(50, 'diff'); |