You are here

function csstidy_print::get_diff in Advanced CSS/JS Aggregation 7

Same name and namespace in other branches
  1. 6 advagg_css_compress/csstidy/class.csstidy_print.inc \csstidy_print::get_diff()

Get difference between the old and new code in bytes and prints the code if necessary. @access public

@version 1.1

Return value

string

File

advagg_css_compress/csstidy/class.csstidy_print.inc, line 379

Class

csstidy_print
CSS Printing class

Code

function get_diff() {
  if (!$this->output_css_plain) {
    $this
      ->formatted();
  }
  $diff = strlen($this->output_css_plain) - strlen($this->input_css);
  if ($diff > 0) {
    return '+' . $diff;
  }
  elseif ($diff == 0) {
    return '+-' . $diff;
  }
  return $diff;
}