<commit_before><?php
/**
 * Cross Applicant Management
 *
 * @filesource
 * @copyright (c) 2013 Cross Solution (http://cross-solution.de)
 * @license   GPLv3
 */

namespace Auth\Service;

use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use Auth\Repository\User as UserRepository;
use Auth\AuthenticationService;

/**
 * Hybridauth authentication adapter factory
 */
class AuthenticationServiceFactory implements FactoryInterface 
{

    /**
     * Creates an instance of \Auth\Adapter\HybridAuth
     * 
     * - injects the \HybridAuth
     * - injects the UserMapper fetched from the service manager.
     * 
     * @param ServiceLocatorInterface $serviceLocator
     * @return \Auth\Adapter\HybridAuth
     * @see \Zend\ServiceManager\FactoryInterface::createService()
     */
    public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $repository = $serviceLocator->get('repositories')->get('user');
        $auth       = new AuthenticationService($repository);
        return $auth;
    }
    
}<commit_msg>[Auth] Use RepositoryService in AuthenticationServiceFactory.<commit_after><?php
/**
 * Cross Applicant Management
 *
 * @filesource
 * @copyright (c) 2013 Cross Solution (http://cross-solution.de)
 * @license   GPLv3
 */

namespace Auth\Service;

use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use Auth\Repository\User as UserRepository;
use Auth\AuthenticationService;

/**
 * Hybridauth authentication adapter factory
 */
class AuthenticationServiceFactory implements FactoryInterface 
{

    /**
     * Creates an instance of \Auth\Adapter\HybridAuth
     * 
     * - injects the \HybridAuth
     * - injects the UserMapper fetched from the service manager.
     * 
     * @param ServiceLocatorInterface $serviceLocator
     * @return \Auth\Adapter\HybridAuth
     * @see \Zend\ServiceManager\FactoryInterface::createService()
     */
    public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $repository = $serviceLocator->get('repositories')->get('Auth/User');
        $auth       = new AuthenticationService($repository);
        return $auth;
    }
    
}
{'fraction_non_alphanumeric': 0.10166441745389114, 'fraction_numerical': 0.00449842555105713, 'mean_word_length': 3.566735112936345, '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': '1461487', 'n_tokens_mistral': 616, 'n_tokens_neox': 587, 'n_words': 138}