DiffEngine::_line_hash

protected DiffEngine::_line_hash($line)

Returns the whole line if it's small enough, or the MD5 hash otherwise.

File

core/lib/Drupal/Component/Diff/Engine/DiffEngine.php, line 136

Class

DiffEngine
Class used internally by Diff to actually compute the diffs.

Namespace

Drupal\Component\Diff\Engine

Code

protected function _line_hash($line) {
  if (Unicode::strlen($line) > $this::MAX_XREF_LENGTH) {
    return md5($line);
  }
  else {
    return $line;
  }
}
doc_Drupal
2016-10-29 09:02:21
Comments
Leave a Comment

Please login to continue.