<commit_before><?php

namespace Application\Repositories\Mock;

use Application\Repositories\Interfaces\IUserRepository;
use Application\Repositories\Doctrine\DoctrineBaseRepository;
use Application\src\Application\Entity\User;

class MockUserRepository implements IUserRepository {

	//Array of classes
	private $users = array();
	private $varname = "user";
	
	public function getAllUsers() {
		return $this->users;
	}
	
	//Params = var 
	public function getUserById($id) {
		foreach($this->users as $user){
		 	if($id == $user->getId()){
		 		return $user;
		 	}		
		}
		return "No $this->varname was found";
	}
	
	//Params = array
	public function getOneUser($params){
		if(is_array($params)){
			$id = null;<commit_msg>MockupUserSeed<commit_after><?php

namespace Application\Repositories\Mock;

use Application\Repositories\Interfaces\IUserRepository;
use Application\Repositories\Doctrine\DoctrineBaseRepository;
use Application\src\Application\Entity\User;

class MockUserRepository implements IUserRepository {

	//Array of classes
	private $users = array();
	private $varname = "users";
	
	public function __construct(){
		//seed
		$new_user = new User();
		$new_user->setId(1);
		$new_user->setName("Benny");
		$new_user->setEmail("<EMAIL>");
		array_push($new_user);
		
		$new_user = new User();
		$new_user->setId(2);
		$new_user->setName("Nick");
		$new_user->setEmail("<EMAIL>");
		array_push($new_user);
		
		$new_user = new User();
		$new_user->setId(3);
		$new_user->setName("Suzanne");
		$new_user->setEmail("<EMAIL>");
		array_push($new_user);
	}
	
	public function getAllUsers() {
		return $this->users;
	}
	
	//Params = var 
	public function getUserById($id) {
		foreach($this->users as $user){
		 	if($id == $user->getId()){
		 		return $user;
		 	}		
		}
		return "No $this->varname was found";
	}
	
	//Params = array
	public function getOneUser($params){
		if(is_array($params)){
			$id = null;
{'fraction_non_alphanumeric': 0.15276329509906153, 'fraction_numerical': 0.0015641293013555788, 'mean_word_length': 4.436260623229462, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 23, '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': '19198', 'n_tokens_mistral': 715, 'n_tokens_neox': 642, 'n_words': 128}