Code Duplication    Length = 14-14 lines in 2 locations

Ajax/bootstrap/html/HtmlBreadcrumbs.php 1 location

@@ 200-213 (lines=14) @@
197
	 * @param Dispatcher $dispatcher the request dispatcher
198
	 * @return \Ajax\bootstrap\html\HtmlBreadcrumbs
199
	 */
200
	public function fromDispatcher($dispatcher,$startIndex=0){
201
		$this->startIndex=$startIndex;
202
		$params=$dispatcher->getParams();
203
		$action=$dispatcher->getActionName();
204
		$items=array($dispatcher->getControllerName());
205
		if(\sizeof($params)>0 || \strtolower($action)!="index" ){
206
			$items[]=$action;
207
			foreach ($params as $p){
208
				if(\is_object($p)===false)
209
				$items[]=$p;
210
			}
211
		}
212
		return $this->addElements($items);
213
	}
214
215
216
	/**

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