<commit_before><?php

namespace StrictPhp\TypeChecker\TypeChecker;

use phpDocumentor\Reflection\Type;
use phpDocumentor\Reflection\Types\Object_;
use StrictPhp\TypeChecker\TypeCheckerInterface;

final class GenericObjectTypeChecker implements TypeCheckerInterface
{
    /**
     * {@inheritDoc}
     */
    public function canApplyToType(Type $type)
    {
        return $type instanceof Object_;
    }

    /**
     * {@inheritDoc}<commit_msg>Don't apply the generic object checker to specific type hints<commit_after><?php

namespace StrictPhp\TypeChecker\TypeChecker;

use phpDocumentor\Reflection\Type;
use phpDocumentor\Reflection\Types\Object_;
use StrictPhp\TypeChecker\TypeCheckerInterface;

final class GenericObjectTypeChecker implements TypeCheckerInterface
{
    /**
     * {@inheritDoc}
     */
    public function canApplyToType(Type $type)
    {
        return $type instanceof Object_
            && ! $type->getFqsen();
    }

    /**
     * {@inheritDoc}
{'fraction_non_alphanumeric': 0.09558067831449127, 'fraction_numerical': 0.0, 'mean_word_length': 3.7281553398058254, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, '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': '3020269', 'n_tokens_mistral': 280, 'n_tokens_neox': 284, 'n_words': 57}