Code Duplication    Length = 13-14 lines in 3 locations

Ajax/semantic/html/collections/HtmlBreadcrumb.php 1 location

@@ 95-108 (lines=14) @@
92
	 * @param Dispatcher $dispatcher the request dispatcher
93
	 * @return \Ajax\bootstrap\html\HtmlBreadcrumbs
94
	 */
95
	public function fromDispatcher($dispatcher, $startIndex=0) {
96
		$this->startIndex=$startIndex;
97
		$params=$dispatcher->getParams();
98
		$action=$dispatcher->getActionName();
99
		$items=array ($dispatcher->getControllerName() );
100
		if (\sizeof($params) > 0 || \strtolower($action) != "index") {
101
			$items[]=$action;
102
			foreach ( $params as $p ) {
103
				if (\is_object($p) === false)
104
					$items[]=$p;
105
			}
106
		}
107
		return $this->addItems($items);
108
	}
109
110
	/**
111
	 * Return the url of the element at $index or the breadcrumbs url if $index is ommited

Ajax/php/laravel/JsUtils.php 1 location

@@ 41-53 (lines=13) @@
38
		return $template;
39
	}
40
41
	public function fromDispatcher($dispatcher){
42
		$params=$dispatcher->getParams();
43
		$action=$dispatcher->getActionName();
44
		$items=array($dispatcher->getControllerName());
45
		if(\sizeof($params)>0 || \strtolower($action)!="index" ){
46
			$items[]=$action;
47
			foreach ($params as $p){
48
				if(\is_object($p)===false)
49
					$items[]=$p;
50
			}
51
		}
52
		return $items;
53
	}
54
}

Ajax/php/phalcon/JsUtils.php 1 location

@@ 56-68 (lines=13) @@
53
		return $template;
54
	}
55
56
	public function fromDispatcher($dispatcher){
57
		$params=$dispatcher->getParams();
58
		$action=$dispatcher->getActionName();
59
		$items=array($dispatcher->getControllerName());
60
		if(\sizeof($params)>0 || \strtolower($action)!="index" ){
61
			$items[]=$action;
62
			foreach ($params as $p){
63
				if(\is_object($p)===false)
64
					$items[]=$p;
65
			}
66
		}
67
		return $items;
68
	}
69
}