<commit_before><?php
namespace nochso\WriteMe\Placeholder\PlaceholderDocs;

use BetterReflection\Reflection\ReflectionClass;
use nochso\WriteMe\Converter;
use nochso\WriteMe\Document;
use nochso\WriteMe\Placeholder\AbstractPlaceholder;
use nochso\WriteMe\Placeholder\Option;
use nochso\WriteMe\Placeholder\OptionList;

/**
 * PlaceholderDocs creates documentation for registered placeholders.
 *
 * This includes the PHPDoc for the classes and their supported options.
 */
class PlaceholderDocs extends AbstractPlaceholder
{
    /**
     * @var \nochso\WriteMe\Interfaces\Placeholder[]
     */
    private $placeholders;

    /**
     * @param \nochso\WriteMe\Interfaces\Placeholder[] $placeholders
     */
    public function setPlaceholders(array $placeholders)
    {
        $this->placeholders = $placeholders;
    }

    /**
     * @return string
     */
    public function getIdentifier()
    {
        return 'placeholder-docs';
    }

    /**
     * @param \nochso\WriteMe\Document $document
     */<commit_msg>fix: Do not include PlaceholderDocs in its own output<commit_after><?php
namespace nochso\WriteMe\Placeholder\PlaceholderDocs;

use BetterReflection\Reflection\ReflectionClass;
use nochso\WriteMe\Converter;
use nochso\WriteMe\Document;
use nochso\WriteMe\Placeholder\AbstractPlaceholder;
use nochso\WriteMe\Placeholder\Option;
use nochso\WriteMe\Placeholder\OptionList;

/**
 * PlaceholderDocs creates documentation for registered placeholders.
 *
 * This includes the PHPDoc for the classes and their supported options.
 *
 * @internal
 */
class PlaceholderDocs extends AbstractPlaceholder
{
    /**
     * @var \nochso\WriteMe\Interfaces\Placeholder[]
     */
    private $placeholders;

    /**
     * @param \nochso\WriteMe\Interfaces\Placeholder[] $placeholders
     */
    public function setPlaceholders(array $placeholders)
    {
        // Don't output documentation about this placeholder itself.
        // It's only for internal usage.
        $this->placeholders = array_filter($placeholders, function ($p) {
            return !$p instanceof self;
        });
    }

    /**
     * @return string
     */
    public function getIdentifier()
    {
        return 'placeholder-docs';
    }

    /**
     * @param \nochso\WriteMe\Document $document
     */
{'fraction_non_alphanumeric': 0.10362920857017928, 'fraction_numerical': 0.0, 'mean_word_length': 3.2058823529411766, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5779016', 'n_tokens_mistral': 653, 'n_tokens_neox': 646, 'n_words': 145}