Code Duplication    Length = 14-25 lines in 2 locations

src/routing/ModuleActionRouter.php 1 location

@@ 41-54 (lines=14) @@
38
	/*
39
	 * (non-PHPdoc) @see \keeko\core\routing\RouteMatcherInterface::match()
40
	 */
41
	public function match($destination) {
42
		if ($destination == '') {
43
			$destination = '/';
44
		}
45
		
46
		$data = $this->matcher->match($destination);
47
		
48
		// unserialize params
49
		if (array_key_exists('params', $data)) {
50
			$data['params'] = $this->unserializeParams($data['params']);
51
		}
52
		
53
		return $data;
54
	}
55
	
56
	/*
57
	 * (non-PHPdoc) @see \keeko\core\routing\RouteGeneratorInterface::match()

src/routing/PageRouter.php 1 location

@@ 28-52 (lines=25) @@
25
	/*
26
	 * (non-PHPdoc) @see \keeko\core\routing\RouteMatcherInterface::match()
27
	 */
28
	public function match($destination) {
29
		if ($destination == '') {
30
			$destination = '/';
31
		}
32
		
33
		$data = $this->matcher->match($destination);
34
		
35
		// find page for matched slug
36
		if (array_key_exists('slug', $data)) {
37
// 			$data['page'] = PageQuery::create()
38
// 				->filterByApplication($this->options['application'])
39
// 				->useRouteQuery()
40
// 					->filterBySlug($data['slug'])
41
// 				->endUse()
42
// 				->find()
43
// 			;
44
		}
45
		
46
		// unserialize params
47
		if (array_key_exists('params', $data)) {
48
			$data['params'] = $this->unserializeParams($data['params']);
49
		}
50
		
51
		return $data;
52
	}
53
	
54
	/*
55
	 * @TODO: More data params (e.g. page) (non-PHPdoc) @see \keeko\core\routing\RouteGeneratorInterface::match()