<commit_before><?php

namespace Buzz\Message;

class Request extends AbstractMessage
{
    const METHOD_GET    = 'GET';
    const METHOD_HEAD   = 'HEAD';
    const METHOD_POST   = 'POST';
    const METHOD_PUT    = 'PUT';
    const METHOD_DELETE = 'DELETE';

    protected $method;
    protected $resource;
    protected $host;
    protected $protocolVersion = 1.0;

    /**
     * Constructor.
     * 
     * @param string $method
     * @param string $resource
     * @param string $host
     */
    public function __construct($method = self::METHOD_GET, $resource = '/', $host = null)
    {
        $this->setMethod($method);
        $this->setResource($resource);
        $this->setHost($host);
    }

    public function setMethod($method)
    {
        $this->method = $method;
    }

    public function getMethod()
    {
        return $this->method;
    }

    public function setResource($resource)
    {
        $this->resource = $resource;
    }

    public function getResource()
    {
        return $this->resource;
    }

    public function setHost($host)
    {
        $this->host = $host;
    }
<commit_msg>Force Request method to be always in upper case<commit_after><?php

namespace Buzz\Message;

class Request extends AbstractMessage
{
    const METHOD_GET    = 'GET';
    const METHOD_HEAD   = 'HEAD';
    const METHOD_POST   = 'POST';
    const METHOD_PUT    = 'PUT';
    const METHOD_DELETE = 'DELETE';

    protected $method;
    protected $resource;
    protected $host;
    protected $protocolVersion = 1.0;

    /**
     * Constructor.
     * 
     * @param string $method
     * @param string $resource
     * @param string $host
     */
    public function __construct($method = self::METHOD_GET, $resource = '/', $host = null)
    {
        $this->setMethod($method);
        $this->setResource($resource);
        $this->setHost($host);
    }

    public function setMethod($method)
    {
        $this->method = strtoupper($method);
    }

    public function getMethod()
    {
        return $this->method;
    }

    public function setResource($resource)
    {
        $this->resource = $resource;
    }

    public function getResource()
    {
        return $this->resource;
    }

    public function setHost($host)
    {
        $this->host = $host;
    }

{'fraction_non_alphanumeric': 0.12445604873803308, 'fraction_numerical': 0.0017406440382941688, 'mean_word_length': 2.251768033946252, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '3281566', 'n_tokens_mistral': 705, 'n_tokens_neox': 666, 'n_words': 160}