Differential D20858 Diff 49727 src/applications/differential/lipsum/PhabricatorDifferentialRevisionTestDataGenerator.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/lipsum/PhabricatorDifferentialRevisionTestDataGenerator.php
Show First 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | public function randomlyModify($code, $altcode) { | ||||
$newcode2 = array(); | $newcode2 = array(); | ||||
$c = 0; | $c = 0; | ||||
for ($i = 0; $i < count($newcode);$i++) { | for ($i = 0; $i < count($newcode);$i++) { | ||||
$newcode2[] = $newcode[$i]; | $newcode2[] = $newcode[$i]; | ||||
if (in_array($i, $randomlines_orig)) { | if (in_array($i, $randomlines_orig)) { | ||||
$newcode2[] = $altcodearr[$randomlines_new[$c++]]; | $newcode2[] = $altcodearr[$randomlines_new[$c++]]; | ||||
} | } | ||||
} | } | ||||
return implode($newcode2, "\n"); | return implode("\n", $newcode2); | ||||
} | } | ||||
} | } |