Code Duplication    Length = 4-4 lines in 2 locations

lib/Cake/Controller/Scaffold.php 1 location

@@ 111-114 (lines=4) @@
108
		$this->controller = $controller;
109
110
		$count = count($this->_passedVars);
111
		for ($j = 0; $j < $count; $j++) {
112
			$var = $this->_passedVars[$j];
113
			$this->{$var} = $controller->{$var};
114
		}
115
116
		$this->redirect = array('action' => 'index');
117

lib/Cake/View/View.php 1 location

@@ 329-332 (lines=4) @@
326
	public function __construct(Controller $controller = null) {
327
		if (is_object($controller)) {
328
			$count = count($this->_passedVars);
329
			for ($j = 0; $j < $count; $j++) {
330
				$var = $this->_passedVars[$j];
331
				$this->{$var} = $controller->{$var};
332
			}
333
			$this->_eventManager = $controller->getEventManager();
334
		}
335
		if (empty($this->request) && !($this->request = Router::getRequest(true))) {