Skip to content

Commit

Permalink
Fix redundant and unused code.
Browse files Browse the repository at this point in the history
  • Loading branch information
DigiLive committed Nov 19, 2020
1 parent 3bc0839 commit 73f6776
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
12 changes: 6 additions & 6 deletions lib/jblond/Diff/Renderer/MainRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,10 @@ private function getOuterChange(string $oldString, string $newString): array
*
* The index of the last element of the array is always returned.
*
* @param array $blocks The array which keeps the changes for the HTML renderer.
* @param string $tag Kind of difference.
* @param integer $lineInOld Start of block in "old".
* @param integer $lineInNew Start of block in "new".
* @param array $blocks The array which keeps the changes for the HTML renderer.
* @param string $tag Kind of difference.
* @param int $lineInOld Start of block in "old".
* @param int $lineInNew Start of block in "new".
*
* @return int The index of the last element.
*/
Expand Down Expand Up @@ -437,7 +437,7 @@ function ($line) {
// Convert special characters to HTML entities
$strings = array_map(
function ($line) {
return htmlspecialchars($line, ENT_NOQUOTES, 'UTF-8');
return htmlspecialchars($line, ENT_NOQUOTES);
},
$strings
);
Expand All @@ -447,7 +447,7 @@ function ($line) {
$line = preg_replace_callback(
'/(^[ \0\1]*)/',
function ($matches) {
return str_replace(' ', " ", $matches[0]);
return str_replace(' ', ' ', $matches[0]);
},
$line
);
Expand Down
6 changes: 1 addition & 5 deletions lib/jblond/Diff/Renderer/MainRendererAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @package jblond\Diff\Renderer
* @author Mario Brandt <[email protected]>
* @author Ferry Cools <[email protected]>
* @copyright (c) 2009 Chris Boulton
* @copyright (c) 2020 Ferry Cools
* @license New BSD License http://www.opensource.org/licenses/bsd-license.php
* @version 2.3.0
* @link https://github.com/JBlond/php-diff
Expand All @@ -33,10 +33,6 @@ abstract class MainRendererAbstract
* Mark line differences.
*/
public const CHANGE_LEVEL_LINE = 2;
/**
* Mark no inline differences.
*/
public const CHANGE_LEVEL_NONE = 4;
/**
* @var Diff $diff Instance of the diff class that this renderer is generating the rendered diff for.
*/
Expand Down

0 comments on commit 73f6776

Please sign in to comment.