Code Duplication    Length = 9-9 lines in 2 locations

ecrire/inc/utils.php 2 locations

@@ 3513-3521 (lines=9) @@
3510
				return null;
3511
			}
3512
3513
			if (!is_int($params[1])
3514
				&& !is_float($params[1])
3515
				&& !is_string($params[1])
3516
				&& $params[1] !== null
3517
				&& !(is_object($params[1]) && method_exists($params[1], '__toString'))
3518
			) {
3519
				trigger_error('array_column(): The column key should be either a string or an integer', E_USER_WARNING);
3520
				return false;
3521
			}
3522
3523
			if (isset($params[2])
3524
				&& !is_int($params[2])
@@ 3523-3531 (lines=9) @@
3520
				return false;
3521
			}
3522
3523
			if (isset($params[2])
3524
				&& !is_int($params[2])
3525
				&& !is_float($params[2])
3526
				&& !is_string($params[2])
3527
				&& !(is_object($params[2]) && method_exists($params[2], '__toString'))
3528
			) {
3529
				trigger_error('array_column(): The index key should be either a string or an integer', E_USER_WARNING);
3530
				return false;
3531
			}
3532
3533
			$paramsInput = $params[0];
3534
			$paramsColumnKey = ($params[1] !== null) ? (string) $params[1] : null;