<commit_before><?php

declare(strict_types=1);

namespace Roave\BetterReflection\Reflection\Deprecated;

use phpDocumentor\Reflection\DocBlockFactory;

/**
 * @internal
 */
final class DeprecatedHelper
{
    private static ?DocBlockFactory $docBlockFactory = null;

    public static function isDeprecated(string $docComment): bool
    {
        if ($docComment === '') {
            return false;
        }

        self::$docBlockFactory ??= DocBlockFactory::createInstance();

        $docBlock = self::$docBlockFactory->create($docComment);

        return $docBlock->hasTag('deprecated');
    }
}<commit_msg>Mark DeprecatedHelper::isDeprecated() as pure<commit_after><?php

declare(strict_types=1);

namespace Roave\BetterReflection\Reflection\Deprecated;

use phpDocumentor\Reflection\DocBlockFactory;

/**
 * @internal
 */
final class DeprecatedHelper
{
    private static ?DocBlockFactory $docBlockFactory = null;

    /**
     * @psalm-pure
     */
    public static function isDeprecated(string $docComment): bool
    {
        if ($docComment === '') {
            return false;
        }

        /** @psalm-suppress ImpureStaticProperty, ImpureMethodCall */
        self::$docBlockFactory ??= DocBlockFactory::createInstance();

        /** @psalm-suppress ImpureStaticProperty, ImpureMethodCall */
        return self::$docBlockFactory->create($docComment)->hasTag('deprecated');
    }
}
{'fraction_non_alphanumeric': 0.1256245538900785, 'fraction_numerical': 0.0014275517487508922, 'mean_word_length': 3.566775244299674, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '3946285', 'n_tokens_mistral': 396, 'n_tokens_neox': 380, 'n_words': 70}