<commit_before><?php

namespace Isolate\UnitOfWork\Entity\Identifier;

use Isolate\UnitOfWork\Entity\Definition\Repository;
use Isolate\UnitOfWork\Entity\Identifier;
use Isolate\UnitOfWork\Exception\RuntimeException;
use Isolate\UnitOfWork\Object\PropertyAccessor;

final class PropertyValueIdentifier implements Identifier
{
    /**
     * @var Repository
     */
    private $definitions;

    /**
     * @var PropertyAccessor
     */
    private $propertyAccessor;

    /**
     * @param Repository $definitions
     */
    public function __construct(Repository $definitions)
    {
        $this->definitions = $definitions;
        $this->propertyAccessor = new PropertyAccessor();
    }

    /**
     * @param $object
     * @return boolean
     */
    public function isEntity($object)
    {
        return $this->definitions->hasDefinition($object);
    }

    /**<commit_msg>Removed final from Identifier<commit_after><?php

namespace Isolate\UnitOfWork\Entity\Identifier;

use Isolate\UnitOfWork\Entity\Definition\Repository;
use Isolate\UnitOfWork\Entity\Identifier;
use Isolate\UnitOfWork\Exception\RuntimeException;
use Isolate\UnitOfWork\Object\PropertyAccessor;

class PropertyValueIdentifier implements Identifier
{
    /**
     * @var Repository
     */
    private $definitions;

    /**
     * @var PropertyAccessor
     */
    private $propertyAccessor;

    /**
     * @param Repository $definitions
     */
    public function __construct(Repository $definitions)
    {
        $this->definitions = $definitions;
        $this->propertyAccessor = new PropertyAccessor();
    }

    /**
     * @param $object
     * @return boolean
     */
    public function isEntity($object)
    {
        return $this->definitions->hasDefinition($object);
    }

    /**
{'fraction_non_alphanumeric': 0.11023622047244094, 'fraction_numerical': 0.0, 'mean_word_length': 2.9798657718120807, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '5629613', 'n_tokens_mistral': 495, 'n_tokens_neox': 488, 'n_words': 92}