<commit_before><?php

declare(strict_types=1);

/*
 * This file is part of Badcow DNS Library.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Badcow\DNS\Parser;

class StringIterator extends \ArrayIterator
{
    /**
     * StringIterator constructor.
     *
     * @param string $string
     */
    public function __construct(string $string = '')
    {
        parent::__construct(str_split($string));
    }

    /**
     * @param string $value
     *
     * @return bool
     */
    public function is(string $value): bool
    {
        return $value === $this->current();
    }

    /**
     * @param string $value
     *
     * @return bool
     */
    public function isNot(string $value): bool
    {
        return $value !== $this->current();
    }

    /**
     * @return string
     */
    public function __toString()
    {
        return implode($this->getArrayCopy());
    }
}<commit_msg>Fix missing implode() $glue parameter.<commit_after><?php

declare(strict_types=1);

/*
 * This file is part of Badcow DNS Library.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Badcow\DNS\Parser;

class StringIterator extends \ArrayIterator
{
    /**
     * StringIterator constructor.
     *
     * @param string $string
     */
    public function __construct(string $string = '')
    {
        parent::__construct(str_split($string));
    }

    /**
     * @param string $value
     *
     * @return bool
     */
    public function is(string $value): bool
    {
        return $value === $this->current();
    }

    /**
     * @param string $value
     *
     * @return bool
     */
    public function isNot(string $value): bool
    {
        return $value !== $this->current();
    }

    /**
     * @return string
     */
    public function __toString()
    {
        return implode('', $this->getArrayCopy());
    }
}
{'fraction_non_alphanumeric': 0.1341991341991342, 'fraction_numerical': 0.000962000962000962, 'mean_word_length': 2.2248062015503876, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, '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': '3924923', 'n_tokens_mistral': 613, 'n_tokens_neox': 606, 'n_words': 167}