Code Duplication    Length = 8-8 lines in 2 locations

app/Tree.php 2 locations

@@ 374-381 (lines=8) @@
371
	 *
372
	 * @return string[]
373
	 */
374
	public static function getIdList() {
375
		$list = [];
376
		foreach (self::getAll() as $tree) {
377
			$list[$tree->tree_id] = $tree->title;
378
		}
379
380
		return $list;
381
	}
382
383
	/**
384
	 * Create arguments to select_edit_control()
@@ 389-396 (lines=8) @@
386
	 *
387
	 * @return string[]
388
	 */
389
	public static function getNameList() {
390
		$list = [];
391
		foreach (self::getAll() as $tree) {
392
			$list[$tree->name] = $tree->title;
393
		}
394
395
		return $list;
396
	}
397
398
	/**
399
	 * Create a new tree