<commit_before><?php
/**
 * User: marcus-campos
 * Date: 02/10/17
 * Time: 10:31
 */

namespace Maestro;


use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Request;

class Rest
{
    protected $url;
    private $endPoint;
    private $method;
    private $response;
    private $assoc;
    private $headers = [];
    private $body = [];

    /**
     * @return string
     */
    public function getUrl() :string
    {
        return $this->url;
    }

    /**
     * @param string $url
     * @return $this
     */
    public function setUrl(string $url)
    {
        $this->url = $url;
        return $this;
    }

    /**
     * @return string
     */
    public function getEndPoint(): string
    {
        return $this->endPoint;
    }

    /**
     * @param string $endPoint
     * @return $this
     */
    public function setEndPoint(string $endPoint)
    {
        $this->endPoint = $endPoint;
        return $this;
    }

    /**
     * @return $this
     */
    public function get()
    {
        $this->method = 'GET';
        return $this;
    }

    /**
     * @return $this
     */
    public function post()
    {
        $this->method = 'POST';
        return $this;
    }

    /**
     * @return $this
     */
    public function put()
    {
        $this->method = 'PUT';
        return $this;
    }

    /**
     * @return $this
     */
    public function delete()
    {
        $this->method = 'DELETE';
        return $this;
    }

    /**
     * @return $this
     */
    public function patch()
    {
        $this->method = 'PATCH';
        return $this;
    }
    
    /**
     * @return $this
     */
    public function headers(array $headers)
    {
        $this->headers = $headers;
        return $this;
    }
    
    /**
     * @return $this
     */
    public function body(array $body)
    {
        $this->body = $body;<commit_msg>Added COPY, HEAD, OPTIONS, LINK, UNLINK, PURGE, LOCK, UNLOCK, PROPFIND, VIEW methods<commit_after><?php
/**
 * User: marcus-campos
 * Date: 02/10/17
 * Time: 10:31
 */

namespace Maestro;


use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Request;

class Rest
{
    protected $url;
    private $endPoint;
    private $method;
    private $response;
    private $assoc;
    private $headers = [];
    private $body = [];

    /**
     * @return string
     */
    public function getUrl() :string
    {
        return $this->url;
    }

    /**
     * @param string $url
     * @return $this
     */
    public function setUrl(string $url)
    {
        $this->url = $url;
        return $this;
    }

    /**
     * @return string
     */
    public function getEndPoint(): string
    {
        return $this->endPoint;
    }

    /**
     * @param string $endPoint
     * @return $this
     */
    public function setEndPoint(string $endPoint)
    {
        $this->endPoint = $endPoint;
        return $this;
    }

    /**
     * @return $this
     */
    public function get()
    {
        $this->method = 'GET';
        return $this;
    }

    /**
     * @return $this
     */
    public function post()
    {
        $this->method = 'POST';
        return $this;
    }

    /**
     * @return $this
     */
    public function put()
    {
        $this->method = 'PUT';
        return $this;
    }

    /**
     * @return $this
     */
    public function delete()
    {
        $this->method = 'DELETE';
        return $this;
    }

    /**
     * @return $this
     */
    public function patch()
    {
        $this->method = 'PATCH';
        return $this;
    }

    /**
     * @return $this
     */
    public function copy()
    {
        $this->method = 'COPY';
        return $this;
    }

    /**
     * @return $this
     */
    public function head()
    {
        $this->method = 'HEAD';
        return $this;
    }

    /**
     * @return $this
     */
    public function options()
    {
        $this->method = 'OPTIONS';
        return $this;
    }    
    
    /**
     * @return $this
     */
    public function link()
    {
        $this->method = 'LINK';
        return $this;
    }

    /**
     * @return $this
     */
    public function unlink()
    {
        $this->method = 'UNLINK';
        return $this;
    }

    /**
     * @return $this
     */
    public function purge()
    {
        $this->method = 'PURGE';
        return $this;
    }

    /**
     * @return $this
     */
    public function lock()
    {
        $this->method = 'LOCK';
        return $this;
    }

    /**
     * @return $this
     */
    public function unlock()
    {
        $this->method = 'UNLOCK';
        return $this;
    }

    /**
     * @return $this
     */
    public function propfind()
    {
        $this->method = 'PROPFIND';
        return $this;
    }

    /**
     * @return $this
     */
    public function view()
    {
        $this->method = 'VIEW';
        return $this;
    }

    /**
     * @return $this
     */
    public function headers(array $headers)
    {
        $this->headers = $headers;
        return $this;
    }
    
    /**
     * @return $this
     */
    public function body(array $body)
    {
        $this->body = $body;
{'fraction_non_alphanumeric': 0.14814093829083122, 'fraction_numerical': 0.004282655246252677, 'mean_word_length': 1.4213006597549482, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 35, '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': '4840317', 'n_tokens_mistral': 1688, 'n_tokens_neox': 1637, 'n_words': 368}