<commit_before><?php 

namespace App\Http;

class RouteResolver{

	private $namespace = "App\\Controllers\\";

	public function changeNamespace($namespace){
		$this->namespace = $namespace;
	}


	public function resolve($controller = 'dashboard',$action = 'index', $args = null){

		
				$controller_path = str_replace("\\",DIRECTORY_SEPARATOR,camel_case($this->namespace));
				$controller_name = studly_case($controller).'Controller';

				//if(!file_exists($controller_path.$controller_name.'.php')){
				if(!class_exists($this->namespace.$controller_name)){
					throw new \Exception('No such file <b>'.$this->namespace.$controller_name.'.php'.'</b>');
				} 

		        $controllerClass = $this->namespace.$controller_name;
		        $controller = \App::make($controllerClass);

		        $action = studly_case($action);
<commit_msg>Avoid controller action to be empty string.<commit_after><?php 

namespace App\Http;

class RouteResolver{

	private $namespace = "App\\Controllers\\";

	public function changeNamespace($namespace){
		$this->namespace = $namespace;
	}


	public function resolve($controller = 'dashboard',$action = 'index', $args = null){

				$action!=""? : $action='index';
		
				$controller_path = str_replace("\\",DIRECTORY_SEPARATOR,camel_case($this->namespace));
				$controller_name = studly_case($controller).'Controller';

				//if(!file_exists($controller_path.$controller_name.'.php')){
				if(!class_exists($this->namespace.$controller_name)){
					throw new \Exception('No such file <b>'.$this->namespace.$controller_name.'.php'.'</b>');
				} 

		        $controllerClass = $this->namespace.$controller_name;
		        $controller = \App::make($controllerClass);

		        $action = studly_case($action);

{'fraction_non_alphanumeric': 0.17049368541905854, 'fraction_numerical': 0.0, 'mean_word_length': 4.396284829721362, 'pattern_counts': {'":': 0, '<': 9, '<?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': '2102098', 'n_tokens_mistral': 574, 'n_tokens_neox': 504, 'n_words': 84}