original_string: public static function discountIsValid($code)
      {
          $discount = Discount_Shortcuts_GetDiscountByCodeOrNull($code);
          if ($discount == null)
              return false;
          $engine = Discount_Shortcuts_GetEngineOrNull($discount->get_type());
          if ($engine == null)
              return false;
          return $engine->isValid($discount);
      }
code: public static function discountIsValid($code)
      {
          $discount = Discount_Shortcuts_GetDiscountByCodeOrNull($code);
          if ($discount == null)
              return false;
          $engine = Discount_Shortcuts_GetEngineOrNull($discount->get_type());
          if ($engine == null)
              return false;
          return $engine->isValid($discount);
      }
code_tokens: public static function discountIsValid ( $ code ) { $ discount = Discount_Shortcuts_GetDiscountByCodeOrNull ( $ code ) ; if ( $ discount == null ) return false ; $ engine = Discount_Shortcuts_GetEngineOrNull ( $ discount -> get_type ( ) ) ; if ( $ engine == null ) return false ; return $ engine -> isValid ( $ discount ) ; }
docstring: Checks if discount with given code is valid.
  
  @param string $code
  @return boolean
docstring_tokens: Checks if discount with given code is valid .