<commit_before><?php
namespace Service;

use Zend\ServiceManager\ServiceLocatorInterface;
use Zend\Db\Sql\Sql;
use Zend\Db\Sql\Zend\Db\Sql;

class AreaService {
	
	protected $serviceLocator;
	protected $db;
	
	public function __construct(ServiceLocatorInterface $serviceLocator){
		$this->serviceLocator = $serviceLocator;
		$this->db = $this->serviceLocator->get('database');		
	}
	
	public function getAreas(){
		$sql = new Sql($this->db);
		$sql->select()->from("Area");
		$selectString = $sql->buildSqlString($select);
		$results = $adapter->query($selectString, $adapter::QUERY_MODE_EXECUTE);
		return $results;
	}
}<commit_msg>update AreaService to use entitymanager<commit_after><?php
namespace Service;

use Zend\ServiceManager\ServiceLocatorInterface;

class AreaService {
	
	protected $serviceLocator;
	protected $em;
	
	public function __construct(ServiceLocatorInterface $serviceLocator){
		$this->serviceLocator = $serviceLocator;
		$this->em = $this->serviceLocator->get('entity-manager');	
	}
	
	public function getAreas(){
		error_log("1");
		try {
			$results = $this->em->getRepository('Application\Model\Entity\Area')->findAll();
		} catch (\Exception $e) {
			error_log("error: ".$e->getMessage());
		}
		error_log("2");
		return $results;
	}
}
{'fraction_non_alphanumeric': 0.15348101265822786, 'fraction_numerical': 0.0015822784810126582, 'mean_word_length': 5.454081632653061, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 20, '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': '7296172', 'n_tokens_mistral': 437, 'n_tokens_neox': 402, 'n_words': 75}