Skip to content

Commit 8037d99

Browse files
committed
fix codacy warnings of unused functions
1 parent 96f028c commit 8037d99

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,9 @@ private function getChangeExtent(string $fromLine, string $toLine)
225225
protected function formatLines(array $lines) : array
226226
{
227227
if ($this->options['tabSize'] !== false) {
228-
$lines = array_map(array($this, 'ExpandTabs'), $lines);
228+
$lines = array_map(function ($item){ return $this->expandTabs($item); }, $lines);
229229
}
230-
$lines = array_map(array($this, 'HtmlSafe'), $lines);
230+
$lines = array_map(function($item){ return $this->htmlSafe($item); }, $lines);
231231
foreach ($lines as &$line) {
232232
$line = preg_replace_callback('# ( +)|^ #', array($this, 'fixSpaces'), $line);
233233
}

lib/jblond/Diff/SequenceMatcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ public function getGroupedOpcodes(int $context = 3) : array
641641
*/
642642
public function ratio() : float
643643
{
644-
$matches = array_reduce($this->getMatchingBlocks(), array($this, 'ratioReduce'), 0);
644+
$matches = array_reduce($this->getMatchingBlocks(), function($sum, $triple){ return $this->ratioReduce($sum, $triple); }, 0);
645645
return $this->calculateRatio($matches, count($this->a) + count($this->b));
646646
}
647647

0 commit comments

Comments
 (0)