Code Duplication    Length = 13-20 lines in 3 locations

application/tests/_ci_phpunit_test/replacing/core/Loader.php 3 locations

@@ 200-219 (lines=20) @@
197
	 */
198
	public function library($library, $params = NULL, $object_name = NULL)
199
	{
200
		if (empty($library))
201
		{
202
			return $this;
203
		}
204
		elseif (is_array($library))
205
		{
206
			foreach ($library as $key => $value)
207
			{
208
				if (is_int($key))
209
				{
210
					$this->library($value, $params);
211
				}
212
				else
213
				{
214
					$this->library($key, $params, $value);
215
				}
216
			}
217
218
			return $this;
219
		}
220
221
		if ($params !== NULL && ! is_array($params))
222
		{
@@ 246-258 (lines=13) @@
243
	 */
244
	public function model($model, $name = '', $db_conn = FALSE)
245
	{
246
		if (empty($model))
247
		{
248
			return $this;
249
		}
250
		elseif (is_array($model))
251
		{
252
			foreach ($model as $key => $value)
253
			{
254
				is_int($key) ? $this->model($value, '', $db_conn) : $this->model($key, $value, $db_conn);
255
			}
256
257
			return $this;
258
		}
259
260
		$path = '';
261
@@ 757-776 (lines=20) @@
754
	 */
755
	public function driver($library, $params = NULL, $object_name = NULL)
756
	{
757
		if (is_array($library))
758
		{
759
			foreach ($library as $key => $value)
760
			{
761
				if (is_int($key))
762
				{
763
					$this->driver($value, $params);
764
				}
765
				else
766
				{
767
					$this->driver($key, $params, $value);
768
				}
769
			}
770
771
			return $this;
772
		}
773
		elseif (empty($library))
774
		{
775
			return FALSE;
776
		}
777
778
		if ( ! class_exists('CI_Driver_Library', FALSE))
779
		{