Code Duplication    Length = 9-9 lines in 2 locations

ecrire/inc/utils.php 2 locations

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