Code Duplication    Length = 9-9 lines in 2 locations

ecrire/inc/utils.php 2 locations

@@ 3487-3495 (lines=9) @@
3484
				return null;
3485
			}
3486
3487
			if (!is_int($params[1])
3488
				&& !is_float($params[1])
3489
				&& !is_string($params[1])
3490
				&& $params[1] !== null
3491
				&& !(is_object($params[1]) && method_exists($params[1], '__toString'))
3492
			) {
3493
				trigger_error('array_column(): The column key should be either a string or an integer', E_USER_WARNING);
3494
				return false;
3495
			}
3496
3497
			if (isset($params[2])
3498
				&& !is_int($params[2])
@@ 3497-3505 (lines=9) @@
3494
				return false;
3495
			}
3496
3497
			if (isset($params[2])
3498
				&& !is_int($params[2])
3499
				&& !is_float($params[2])
3500
				&& !is_string($params[2])
3501
				&& !(is_object($params[2]) && method_exists($params[2], '__toString'))
3502
			) {
3503
				trigger_error('array_column(): The index key should be either a string or an integer', E_USER_WARNING);
3504
				return false;
3505
			}
3506
3507
			$paramsInput = $params[0];
3508
			$paramsColumnKey = ($params[1] !== null) ? (string) $params[1] : null;