<commit_before><?php
/**
 * This file belongs to the AnoynmFramework
 *
 * @author vahitserifsaglam <<EMAIL>>
 * @see http://gemframework.com
 *
 * Thanks for using
 */

namespace Anonym\Html\Form;

/**
 * Class FormHaveOptions
 * @package Anonym\Html\Form
 */
trait FormHaveOptions
{
    /**
     * the type of array for options values
     *
     * @var array
     */
    protected $options;

    /**
     * @return array
     */
    public function getOptions()
    {
        return $this->options;
    }

    /**
     * @param array $options
     * @return FormHaveOptions
     */
    public function setOptions($options)
    {
        $this->options = $options;
        return $this;
    }

    private function buildClassString($class){
        if (is_string($class)) {
            $class = (array) $class;
        }
    }
    /**
     * build options string
     *
     * @return string
     */
    protected function buildOptions()
    {
        $created = '';

        foreach($this->getOptions() as $key => $value){

            if ($key === 'class') {
                $value = $this->buildClassString($value);
            }

            $created .= "$key = '$value' ";
        }

        return rtrim($created, ' ');
    }
}
<commit_msg>made some updates<commit_after><?php
/**
 * This file belongs to the AnoynmFramework
 *
 * @author vahitserifsaglam <<EMAIL>>
 * @see http://gemframework.com
 *
 * Thanks for using
 */

namespace Anonym\Html\Form;

/**
 * Class FormHaveOptions
 * @package Anonym\Html\Form
 */
trait FormHaveOptions
{
    /**
     * the type of array for options values
     *
     * @var array
     */
    protected $options;

    /**
     * @return array
     */
    public function getOptions()
    {
        return $this->options;
    }

    /**
     * @param array $options
     * @return FormHaveOptions
     */
    public function setOptions($options)
    {
        $this->options = $options;
        return $this;
    }

    /**
     * create class option
     *
     * @param $class
     * @return string
     */
    private function buildClassString($class){
        if (is_string($class)) {
            $class = (array) $class;
        }

        return join(' ', $class);
    }
    /**
     * build options string
     *
     * @return string
     */
    protected function buildOptions()
    {
        $created = '';

        foreach($this->getOptions() as $key => $value){

            if ($key === 'class') {
                $value = $this->buildClassString($value);
            }

            $created .= "$key = '$value' ";
        }

        return rtrim($created, ' ');
    }
}

{'fraction_non_alphanumeric': 0.14117199391171995, 'fraction_numerical': 0.0, 'mean_word_length': 1.7557651991614256, 'pattern_counts': {'":': 0, '<': 9, '<?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': '238433', 'n_tokens_mistral': 783, 'n_tokens_neox': 769, 'n_words': 180}