original_string: public function countPercent($currentStep, $maxStep)
      {
          $percent = $maxStep ? round(100 * $currentStep / $maxStep) : 0;
          if ($percent > 100) {
              $percent = 100;
          }
          if ($percent == 100 && $currentStep != $maxStep) {
              $percent = 99;
          }
          if ($percent == 100) {
              $this->clearCache();
          }
          return $percent;
      }
code: public function countPercent($currentStep, $maxStep)
      {
          $percent = $maxStep ? round(100 * $currentStep / $maxStep) : 0;
          if ($percent > 100) {
              $percent = 100;
          }
          if ($percent == 100 && $currentStep != $maxStep) {
              $percent = 99;
          }
          if ($percent == 100) {
              $this->clearCache();
          }
          return $percent;
      }
code_tokens: public function countPercent ( $ currentStep , $ maxStep ) { $ percent = $ maxStep ? round ( 100 * $ currentStep / $ maxStep ) : 0 ; if ( $ percent > 100 ) { $ percent = 100 ; } if ( $ percent == 100 && $ currentStep != $ maxStep ) { $ percent = 99 ; } if ( $ percent == 100 ) { $ this -> clearCache ( ) ; } return $ percent ; }
docstring: Returns percent.
  Clears cache at 100.
  @param int $currentStep
  @param int $maxStep
  @return int
  @since 0.2
docstring_tokens: Returns percent . Clears cache at 100 .