Skip to content

Commit ef0f9ae

Browse files
committed
PSR2 indention
1 parent f21937d commit ef0f9ae

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

lib/jblond/Diff/Renderer/Html/HtmlArray.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,19 @@ private function getChangeExtent(string $fromLine, string $toLine)
221221
protected function formatLines(array $lines) : array
222222
{
223223
if ($this->options['tabSize'] !== false) {
224-
$lines = array_map(function ($item){ return $this->expandTabs($item); }, $lines);
224+
$lines = array_map(
225+
function ($item) {
226+
return $this->expandTabs($item);
227+
},
228+
$lines
229+
);
225230
}
226-
$lines = array_map(function($item){ return $this->htmlSafe($item); }, $lines);
231+
$lines = array_map(
232+
function ($item) {
233+
return $this->htmlSafe($item);
234+
},
235+
$lines
236+
);
227237
foreach ($lines as &$line) {
228238
$line = preg_replace_callback('# ( +)|^ #', array($this, 'fixSpaces'), $line);
229239
}

lib/jblond/Diff/SequenceMatcher.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,12 @@ public function getMatchingBlocks() : array
427427
}
428428
}
429429

430-
usort($matchingBlocks, function($aArray, $bArray) { return $this->tupleSort($aArray, $bArray); });
430+
usort(
431+
$matchingBlocks,
432+
function ($aArray, $bArray) {
433+
return $this->tupleSort($aArray, $bArray);
434+
}
435+
);
431436

432437
$i1 = 0;
433438
$j1 = 0;
@@ -641,7 +646,13 @@ public function getGroupedOpcodes(int $context = 3) : array
641646
*/
642647
public function ratio() : float
643648
{
644-
$matches = array_reduce($this->getMatchingBlocks(), function($sum, $triple){ return $this->ratioReduce($sum, $triple); }, 0);
649+
$matches = array_reduce(
650+
$this->getMatchingBlocks(),
651+
function ($sum, $triple) {
652+
return $this->ratioReduce($sum, $triple);
653+
},
654+
0
655+
);
645656
return $this->calculateRatio($matches, count($this->old) + count($this->new));
646657
}
647658

0 commit comments

Comments
 (0)