Code Duplication    Length = 8-8 lines in 2 locations

code/model/Pipeline.php 1 location

@@ 417-424 (lines=8) @@
414
	 * @param string $setting Settings
415
	 * @return mixed Value of setting, or null if not set
416
	 */
417
	public function getConfigSetting($setting) {
418
		$source = $this->getConfigData();
419
420
		foreach(func_get_args() as $setting) {
421
			if(empty($source[$setting])) {
422
				return null;
423
			}
424
			$source = $source[$setting];
425
		}
426
427
		return $source;

code/model/steps/PipelineStep.php 1 location

@@ 134-141 (lines=8) @@
131
	 * @param string $setting Settings
132
	 * @return mixed Value of setting, or null if not set
133
	 */
134
	public function getConfigSetting($setting) {
135
		$source = $this->getConfigData();
136
		foreach(func_get_args() as $setting) {
137
			if(empty($source[$setting])) {
138
				return null;
139
			}
140
			$source = $source[$setting];
141
		}
142
		return $source;
143
	}
144