public function getPercentage() { if ($this->numLines > 0) { $percent = $this->numDuplicateLines / $this->numLines * 100; } else { $percent = 100; } return sprintf('%01.2F%%', $percent); }