original_string: protected function validate_scale($val) {
          global $COURSE;
          $scales = get_scales_menu($COURSE->id);
          return (!empty($val) && isset($scales[(int)$val])) ? true : false;
      }
code: protected function validate_scale($val) {
          global $COURSE;
          $scales = get_scales_menu($COURSE->id);
          return (!empty($val) && isset($scales[(int)$val])) ? true : false;
      }
code_tokens: protected function validate_scale ( $ val ) { global $ COURSE ; $ scales = get_scales_menu ( $ COURSE -> id ) ; return ( ! empty ( $ val ) && isset ( $ scales [ ( int ) $ val ] ) ) ? true : false ; }
docstring: Determines whether a given value is a valid scale selection.
  
  @param string|int $val The value to test.
  @return bool Valid or invalid
docstring_tokens: Determines whether a given value is a valid scale selection .