original_string: public static function getRequest($current = false)
      {
          if ($current) {
              $request = end(static::$_requests);
  
              return $request ?: null;
          }
  
          return isset(static::$_requests[0]) ? static::$_requests[0] : null;
      }
code: public static function getRequest($current = false)
      {
          if ($current) {
              $request = end(static::$_requests);
  
              return $request ?: null;
          }
  
          return isset(static::$_requests[0]) ? static::$_requests[0] : null;
      }
code_tokens: public static function getRequest ( $ current = false ) { if ( $ current ) { $ request = end ( static :: $ _requests ) ; return $ request ? : null ; } return isset ( static :: $ _requests [ 0 ] ) ? static :: $ _requests [ 0 ] : null ; }
docstring: Get the current request object, or the first one.
  
  @param bool $current True to get the current request, or false to get the first one.
  @return \Cake\Http\ServerRequest|null
docstring_tokens: Get the current request object or the first one .