<commit_before><?php
/**
 * @author        "<NAME>" <<EMAIL>>
 * @package       Metrol/DBSql
 * @version       1.0
 * @copyright (c) 2016, <NAME>
 */

namespace Metrol\DBSql\PostgreSQL;

/**
 * Provides the functionality that statements and various helpers use from the
 * Quotable object
 *
 */
trait QuoterTrait
{
    /**
     * The object that handles auto quoting field and table names.
     *
     */
    protected Quotable $quotable;

    /**
     * Provide the quoting utility to use on Table and Field names
     *
     */
    public function quoter(): Quotable
    {
        if ( !is_object($this->quotable) )
        {
            $this->quotable = new Quotable;
        }

        return $this->quotable;
    }

    /**
     * Tell the quoter engine whether to try and automatically quote
     * field and table names.  When turned off, quoting is manual.
     *
     */
    public function enableQuoting(bool $flag): static<commit_msg>Fix a problem with checking for a set value<commit_after><?php
/**
 * @author        "<NAME>" <<EMAIL>>
 * @package       Metrol/DBSql
 * @version       1.0
 * @copyright (c) 2016, <NAME>
 */

namespace Metrol\DBSql\PostgreSQL;

/**
 * Provides the functionality that statements and various helpers use from the
 * Quotable object
 *
 */
trait QuoterTrait
{
    /**
     * The object that handles auto quoting field and table names.
     *
     */
    protected Quotable $quotable;

    /**
     * Provide the quoting utility to use on Table and Field names
     *
     */
    public function quoter(): Quotable
    {
        if ( ! isset($this->quotable) )
        {
            $this->quotable = new Quotable;
        }

        return $this->quotable;
    }

    /**
     * Tell the quoter engine whether to try and automatically quote
     * field and table names.  When turned off, quoting is manual.
     *
     */
    public function enableQuoting(bool $flag): static
{'fraction_non_alphanumeric': 0.10515356585111921, 'fraction_numerical': 0.006246746486205101, 'mean_word_length': 2.1508196721311474, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, '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': '3294872', 'n_tokens_mistral': 573, 'n_tokens_neox': 563, 'n_words': 185}