<commit_before><?php

namespace UniMapper\Flexibee;

use Httpful\Request;
use UniMapper\Association;
use UniMapper\Adapter\IQuery;
use UniMapper\Exception;

class Adapter extends \UniMapper\Adapter
{

    /** @var bool */
    public static $likeWithSimilar = true;

    /** @var string */
    private $baseUrl;

    /** @var \Httpful\Request $template Request template */
    private $template;

    public function __construct(array $config)
    {
        parent::__construct(new Adapter\Mapping);
        $this->baseUrl = $config["host"] . "/c/" . $config["company"];
        $this->template = Request::init();

        if (isset($config["user"])) {

            // Set authentication
            $this->template->authenticateWith($config["user"], $config["password"])
                ->withoutStrictSSL()
                ->followRedirects(true);

            // Set SSL version
            if (isset($config["ssl_version"])) {

              $this->template->addOnCurlOption(
                  CURLOPT_SSLVERSION,
                  (int) $config["ssl_version"]
              );
            }
        }
    }

    public function setAuthUser($username)
    {
        $this->template->addHeader("X-FlexiBee-Authorization", $username);
    }

    public function createDelete($evidence)
    {
        $query = new Query($evidence, Query::PUT, ["@action" => "delete"]);
        $query->resultCallback = function ($result) {
            return (int) $result->stats->deleted;
        };
        return $query;
    }

    public function createDeleteOne($evidence, $column, $primaryValue)
    {
        $query = new Query($evidence, Query::DELETE);
        $query->id = $primaryValue;<commit_msg>codestyle<commit_after><?php

namespace UniMapper\Flexibee;

use Httpful\Request;
use UniMapper\Association;
use UniMapper\Adapter\IQuery;
use UniMapper\Exception;

class Adapter extends \UniMapper\Adapter
{

    /** @var bool */
    public static $likeWithSimilar = true;

    /** @var string */
    private $baseUrl;

    /** @var \Httpful\Request $template Request template */
    private $template;

    public function __construct(array $config)
    {
        parent::__construct(new Adapter\Mapping);
        $this->baseUrl = $config["host"] . "/c/" . $config["company"];
        $this->template = Request::init();

        if (isset($config["user"])) {

            // Set authentication
            $this->template->authenticateWith($config["user"], $config["password"])
                ->withoutStrictSSL()
                ->followRedirects(true);

            // Set SSL version
            if (isset($config["ssl_version"])) {

                $this->template->addOnCurlOption(
                    CURLOPT_SSLVERSION,
                    (int) $config["ssl_version"]
                );
            }
        }
    }

    public function setAuthUser($username)
    {
        $this->template->addHeader("X-FlexiBee-Authorization", $username);
    }

    public function createDelete($evidence)
    {
        $query = new Query($evidence, Query::PUT, ["@action" => "delete"]);
        $query->resultCallback = function ($result) {
            return (int) $result->stats->deleted;
        };
        return $query;
    }

    public function createDeleteOne($evidence, $column, $primaryValue)
    {
        $query = new Query($evidence, Query::DELETE);
        $query->id = $primaryValue;
{'fraction_non_alphanumeric': 0.14344746162927982, 'fraction_numerical': 0.0, 'mean_word_length': 2.2743961352657003, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 33, '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': '5238085', 'n_tokens_mistral': 972, 'n_tokens_neox': 916, 'n_words': 187}