original_string: public static function exists($type = 'post')
      {
          switch ($type) {
              case 'post':
                  return (!empty($_POST)) ? true : false;
                  break;
              case 'get':
                  return (!empty($_GET)) ? true : false;
                  break;
              default:
                  return false;
                  break;
          }
      }
code: public static function exists($type = 'post')
      {
          switch ($type) {
              case 'post':
                  return (!empty($_POST)) ? true : false;
                  break;
              case 'get':
                  return (!empty($_GET)) ? true : false;
                  break;
              default:
                  return false;
                  break;
          }
      }
code_tokens: public static function exists ( $ type = 'post' ) { switch ( $ type ) { case 'post' : return ( ! empty ( $ _POST ) ) ? true : false ; break ; case 'get' : return ( ! empty ( $ _GET ) ) ? true : false ; break ; default : return false ; break ; } }
docstring: Check the given request type exists.
  
  @param string $type
  @return bool
docstring_tokens: Check the given request type exists .