<commit_before><?php
/*
 * This file is part of Graze DAL
 *
 * Copyright (c) 2014 Nature Delivered Ltd. <http://graze.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @see  http://github.com/graze/dal/blob/master/LICENSE
 */
namespace Graze\Dal\Adapter\ActiveRecord\Mapper;

use Zend\Stdlib\Hydrator\HydratorInterface;

abstract class AbstractMapper implements MapperInterface
{
    protected $entityName;
    protected $recordName;

    /**
     * @param string $entityName
     * @param string $recordName
     */
    public function __construct($entityName, $recordName)
    {
        $this->entityName = $entityName;
        $this->recordName = $recordName;
    }

    /**
     * @return HydratorInterface
     */
    abstract protected function getEntityHydrator();

    /**
     * @return HydratorInterface
     */
    abstract protected function getRecordHydrator();

    /**
     * @param object $entity
     * @return array
     */
    public function getEntityData($entity)
    {
        return $this->getEntityHydrator()->extract($record);
    }

    /**
     * @param object $record
     * @return array
     */
    public function getRecordData($record)
    {
        return $this->getRecordHydrator()->extract($record);
    }
}<commit_msg>Fixing incorrect variable name<commit_after><?php
/*
 * This file is part of Graze DAL
 *
 * Copyright (c) 2014 Nature Delivered Ltd. <http://graze.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @see  http://github.com/graze/dal/blob/master/LICENSE
 */
namespace Graze\Dal\Adapter\ActiveRecord\Mapper;

use Zend\Stdlib\Hydrator\HydratorInterface;

abstract class AbstractMapper implements MapperInterface
{
    protected $entityName;
    protected $recordName;

    /**
     * @param string $entityName
     * @param string $recordName
     */
    public function __construct($entityName, $recordName)
    {
        $this->entityName = $entityName;
        $this->recordName = $recordName;
    }

    /**
     * @return HydratorInterface
     */
    abstract protected function getEntityHydrator();

    /**
     * @return HydratorInterface
     */
    abstract protected function getRecordHydrator();

    /**
     * @param object $entity
     * @return array
     */
    public function getEntityData($entity)
    {
        return $this->getEntityHydrator()->extract($entity);
    }

    /**
     * @param object $record
     * @return array
     */
    public function getRecordData($record)
    {
        return $this->getRecordHydrator()->extract($record);
    }
}
{'fraction_non_alphanumeric': 0.11443337024732374, 'fraction_numerical': 0.0029531192321889995, 'mean_word_length': 2.7849162011173183, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 17, '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': '5994677', 'n_tokens_mistral': 787, 'n_tokens_neox': 765, 'n_words': 193}