From b28b05342bccb9ecb3fbbfff9a29b78e4393554e Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 25 Feb 2019 20:02:10 -0800 Subject: [PATCH] Simplify one "array_keys/range" -> "phutil_is_natural_list()" in "phabricator/" Summary: Depends on D20213. Simplify this idiom. Test Plan: Squinted hard; `grep array_keys | grep range`. Reviewers: amckinley Reviewed By: amckinley Differential Revision: https://secure.phabricator.com/D20215 --- src/applications/config/type/PhabricatorSetConfigType.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/config/type/PhabricatorSetConfigType.php b/src/applications/config/type/PhabricatorSetConfigType.php index 805ae50468..553ee614b8 100644 --- a/src/applications/config/type/PhabricatorSetConfigType.php +++ b/src/applications/config/type/PhabricatorSetConfigType.php @@ -43,7 +43,7 @@ final class PhabricatorSetConfigType } if ($value) { - if (array_keys($value) !== range(0, count($value) - 1)) { + if (!phutil_is_natural_list($value)) { throw $this->newException( pht( 'Option "%s" is of type "%s", and should be specified on the '. -- 2.51.2