<commit_before><?php 
  
namespace Acd; 
  
/** 
* Http class
* @author Acidvertigo MIT Licence 
*/ 
class Http 
{ 
  
  /** 
   * Check HTTP version
   * @return string 
   */
  public function protocol()
  {  
    return $_SERVER['SERVER_PROTOCOL'];
  }
  
  /** 
   * Check if communication is on SSL or not
   * @return bool true on HTTPS 
   */
  public function isSsl()
  {  
    return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? true : false;
  }
  
  /** 
   * @param string $method HTTP method
   * @return bool true if the mothod is safe
   */ 
   public function isSafeMethod($method) 
   { 
      $safeMethods = ['HEAD', 'GET', 'OPTIONS', 'TRACE'];
      return isset($safeMethods[$method]);
   } 

  
  /** 
   * @param string $method HTTP method
   * @return bool true if the method is idempotent
   */ 
   public function isIdempotentMethod($method) 
   { 
     // Though it is possible to be idempotent, POST 
     // is not guarunteed to be, and more often than 
     // not, it is not. 
      $idempotentMethods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'PUT', 'TRACE'];
      return isset($idempotentMethods[$method]);
   }
}<commit_msg>Scrutinizer Auto-Fixes<commit_after><?php 
  
namespace Acd; 
  
/** 
* Http class
* @author Acidvertigo MIT Licence 
*/ 
class Http 
{ 
  
    /** 
     * Check HTTP version
     * @return string 
     */
    public function protocol()
    {  
    return $_SERVER['SERVER_PROTOCOL'];
    }
  
    /** 
     * Check if communication is on SSL or not
     * @return bool true on HTTPS 
     */
    public function isSsl()
    {  
    return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? true : false;
    }
  
    /** 
     * @param string $method HTTP method
     * @return bool true if the mothod is safe
     */ 
    public function isSafeMethod($method) 
    { 
        $safeMethods = ['HEAD', 'GET', 'OPTIONS', 'TRACE'];
        return isset($safeMethods[$method]);
    } 

  
    /** 
     * @param string $method HTTP method
     * @return bool true if the method is idempotent
     */ 
    public function isIdempotentMethod($method) 
    { 
        // Though it is possible to be idempotent, POST 
        // is not guarunteed to be, and more often than 
        // not, it is not. 
        $idempotentMethods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'PUT', 'TRACE'];
        return isset($idempotentMethods[$method]);
    }
}
{'fraction_non_alphanumeric': 0.14017571884984026, 'fraction_numerical': 0.0023961661341853034, 'mean_word_length': 2.3489304812834226, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5343637', 'n_tokens_mistral': 833, 'n_tokens_neox': 772, 'n_words': 231}